How to multi-line "Replace in files..." in Notepad++

Rob Kam picture Rob Kam · Jan 1, 2009 · Viewed 118.3k times · Source

If the free source code editor Notepad++ has the feature "Find in files...", that is without the files being opened in the editor, does it also have the feature "Replace in files..."?

Notepad++ is based on the editing component Scintilla - for which at SourceForge there is a response to a request for this feature: "No need for this to be included in SciTE as you can add this command to the Tools menu using the Parameters dialog." So is it possible to do multi-line replace in files in Notepad++?

Answer

Alex picture Alex · Nov 1, 2010

It's easy to do multiline replace in Notepad++. You have to use \n to represent the newline in your string, and it works for both search and replace strings. You have to make sure to select "Extended" search mode in the bottom left corner of the search window.

I found a good article describing the features here: http://markantoniou.blogspot.com/2008/06/notepad-how-to-use-regular-expressions.html