On a similar note, I find the behaviour of % in the search pattern a bit confusing. It seems that variable references are always expanded, whereas there is an option not to expand them in the replacement text. This leads to an unintuitive situation where you want to replace every occurrence of % with %%: the search pattern is %% and the replacement pattern is %%. An option would be good.
Also, if anyone is looking at this action, I would love an explicit way to set variables to subexpressions. A simple improvement would be allowing you to replace to a different variable from the source. So you could have something like: Source variable: source, which contains “foo foo 12345 boo” Pattern: \d+ Save to: dest
End result: source is unchanged, but dest now contains 12345. (actually this wouldn’t really work if the source text featured the pattern more than once)
Even better would be allowing you to save multiple subexpressions to separate variables: Source text: 2001-03-25 filename.txt,Comment comment foo Pattern: ^(\d±\d±\d+) ([A-Za-z.]+),(.*)$ Save subexpression 1 to: Revdate Save subexpression 2 to: Filename Save subexpression 3 to: Comment