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
)