Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Notepad++ newline Regex Issues [duplicate]

Possible Duplicate:
Find CRLF in Notepad++

I am trying to use notepad++ for some simple regex find and replace. But when I try to use the regular expression syntax for a new line (\r\n) I get the folowing error:

can't find the text: "\r\n"

\r\n works in "Extended" search and in other text editors, but not in the Regular Expression search.

Any ideas?

like image 325
chris Avatar asked Feb 15 '26 02:02

chris


1 Answers

Notepad++'s regex engine doesn't support multiple lines, so newline characters can't be matched. If you need to find and replace blank lines, you need to use extended search. This is no longer true as of Notepad++ 6.0, which now uses PCRE as its regex engine and allows for multi-line replacements. See the accepted answer to the duplicate question for more info.

like image 170
BoltClock Avatar answered Feb 16 '26 15:02

BoltClock