Multi line search and replace tool

sed will do what you want.

See the FAQ entry about exactly this here http://sed.sourceforge.net/sedfaq4.html#s4.23.3

If you need to match a static block of text (which may occur any number of times throughout a file), where the contents of the block are known in advance, then this script is easy to use

Sed is available for Windows. See http://gnuwin32.sourceforge.net/packages/sed.htm


The JetBrains family of IDEs: IntelliJ, RubyMine, PHPStorm etc. will do a multi-line search and replace.

Select the text in question and press ctrl-shift-F -- this will open the replace dialog with the selected text as the find expression (using a regex with newlines escaped as \n)

Tags:

Search