in reply to Re^2: Multiple Search and Replaces on one file
in thread Multiple Search and Replaces on one file
You said you don't want the first set of date/time info, nor the "WARNING" ... so why capture them at all? Use non_captureing parens, (:...) for that which you are using merely as a marker for the string you want.
Please read the two items surrounding kaif's question... (Aargh; seem to have sent reply to kaif's to bitbucket, so repeating below) and more particularly (or, at least, even more diligently) the suggestions from holli, et al.
Update:
(?=WARNING) is a lookahead (aka lookaround), which
the second "WARNING" in the regex matches the word itself which therefore gets included (along with the trailing \s, space) in the NON_capture, (?:...)
HTH
|
|---|