Multi Line Search (then insert)

A place to try and solve your RegEx problems.
Post Reply
bhooper
Posts: 1
Joined: Thu Aug 06, 2015 9:02 pm

Multi Line Search (then insert)

Post by bhooper »

Forgive possible elementary nature of this, but I want to search all text files within a folder for a fixed series of lines and then insert a set sequence of lines ahead of the found lines.
Note that the "searched for" lines will include blank lines.
e.g.

Mary had a
little


lamb

Then simply add a fixed set of lines before these

one two
three four
Mary had a
little


lamb

Thanks
User avatar
DigitalVolcano
Site Admin
Posts: 1717
Joined: Thu Jun 09, 2011 10:04 am

Re: Multi Line Search (then insert)

Post by DigitalVolcano »

You can do multiple line search and replace using the edit button next to the Find/replace boxes. Clicking this will pop up a multi-line editor.

Note that the line endings in the editor will need to match that of your target file (you can change this in the options window)
Post Reply