Mulit line grep

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

Post Reply
slouw
Posts: 8
Joined: Wed Dec 18, 2013 4:48 pm

Mulit line grep

Post by slouw » Wed Feb 03, 2016 1:25 pm

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

User avatar
DataMystic Support
Site Admin
Posts: 2240
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Mulit line grep

Post by DataMystic Support » Wed Feb 03, 2016 5:59 pm

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
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests