Remove paragraph between 2 lines that start w/certain word

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

Aircut
Posts: 12
Joined: Sun Oct 28, 2012 2:09 pm

Remove paragraph between 2 lines that start w/certain word

Postby Aircut » Fri Feb 15, 2013 2:08 pm

advise would be greatly appreciated

i need to remove a paragraph between lines which starts with a certain words

WORD1 [variable string1]
paragraph to be removed
WORD2 [variable string2]

output wanted:

WORD1 variable string1
WORD2 variable string2

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

Re: Remove paragraph between 2 lines that start w/certain wo

Postby DataMystic Support » Tue Feb 19, 2013 6:13 am

Search for EasyPattern:

Code: Select all

WORD1 [capture(1+ not cr or lf) as 'a']
paragraph to be removed
WORD2 [capture(longest 1+ not cr or lf) as 'b']


Replace with:

Code: Select all

WORD1 @a@
WORD2 @b@
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


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 6 guests