Page 1 of 1

Remove paragraph between 2 lines that start w/certain word

Posted: Fri Feb 15, 2013 2:08 pm
by Aircut
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

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

Posted: Tue Feb 19, 2013 6:13 am
by DataMystic Support
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@