Page 1 of 1

Mulit line grep

Posted: Wed Feb 03, 2016 1:25 pm
by slouw
How can I capture a multi line grep from a text file.
There are paragraphs in the file with paragraph start and end signatures which I can identify with Perl regex (my preferred pattern type) as shown in the screenshot.
The existing grep filters had an option for .* to match carriage returns then I think I could do it.
This option I see for find/replace filters not grep.

Many thanks for any reply

Image

Re: Mulit line grep

Posted: Wed Feb 03, 2016 5:59 pm
by DataMystic Support
Just use the search/replace filter with the Extract option checked, and with output to a new file.

Use this pattern:

Code: Select all

^[^\r\n]+cssipDisplayMsgL.*\d{7}
And replace with

Code: Select all

$0