I want to match the following: a zero length line, with the match continuing across lines of non-zero length until a particular string is matched in a line. E.g: the match starts with a zero length line and continues until STOP is reached:
Some random text I don't care about
The match starts at the beginning of this line
The match continues across this line
The match stops here STOP more
text I don't care about
Any suggestions?
Thanks
This should do it:
A little demo:
which will output:
A small explanation: