Jun-10-2021, 05:14 PM
Thanks, Gribouillis. At first glance that looks very elegant …
But:
But:
- The
re.match
that you provided catches the null casetest_string = 'key_phrase []'
, that I did not want to catch? - I was thinking more along the lines of either
editor.replace(…)
oreditor.search(…)
?
- Given match ==
22 1 333
, - I could use
local_arg = match_obj.group(1).split()
in a handler-function, - before printing, listing or substituting?
- and then, for replacing, re-string the substitution result(s) into a return_arg?