So in attempting to get something to work, I’ve come up with the following regular expression replacement (generated via code):
find: (?(DEFINE)(?<TS>\d{1,3}:\d{2}:\d{2}\.\d{3},\d{1,3}:\d{2}:\d{2}\.\d{3}))like(?<RE>\x20|\R|\R*(?<TSLINE>(?P>TS))\R)a(?P>RE)fire
repl: it so that it will \r\n\r\n$+{TSLINE}\r\nliquify
And running it on this data:
0:00:17.680,0:00:20.400
vaporize like a
0:00:19.840,0:00:22.400
fire
0:00:17.680,0:00:20.400
vaporize like a
0:00:19.840,0:00:22.400
fire
Should produce this result:
0:00:17.680,0:00:20.400
vaporize it so that it will
0:00:19.840,0:00:22.400
liquify
0:00:17.680,0:00:20.400
vaporize it so that it will
0:00:19.840,0:00:22.400
liquify
But it is ignoring my use of $+{TSLINE} in the replace expression and produces the following:
0:00:17.680,0:00:20.400
vaporize it so that it will
liquefy
0:00:17.680,0:00:20.400
vaporize it so that it will
liquefy
It is working fine in the Boost emulation mode for RegexBuddy, just not in Notepad++.
Any ideas?
I’m also open to someone changing the regexes I’m using.
Given that this is a general problem with a complicated regex situation between every word in a multiple word search string, I thought it better to switch to named groups instead of numbered groups, but as of yet I don’t feel confident with any approach.