How do you get Notepad++ to show separate lines when /r/n is in the text?

Curtis picture Curtis · Aug 14, 2014 · Viewed 12.6k times · Source

I've pasted some XML into Notepad++. The pasted text contains \r\n wherever a newline is supposed to occur. However, Notepad++ is just showing the entire file on a single line. It is as if it is ignoring the \r\n

So the text look like this:

Some stuff on one line\r\n     Some stuff that should be on another line\r\n

Instead of:

Some stuff on one line
Some stuff that should be on another line

Answer

ehsan picture ehsan · Jul 9, 2019

enter image description here

Press Ctrl+H and the Replace dialog will open.

  1. Type \\r\\n in "Find what"
  2. Type \r\n in "Replace with".
  3. select search mode Extended (\r, \n, \t, \x..., \0)
  4. click "Replace All"