Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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
like image 426
Curtis Avatar asked Aug 14 '14 16:08

Curtis


3 Answers

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"
like image 159
ehsan Avatar answered Sep 28 '22 15:09

ehsan


Try setting the search mode in Notepad++ to Extended. Then, find and replace all the /r/n with an actual line break(\n). See: This post for more information about this similar case. From what I found, you can get away with simply \n.

like image 27
Adam Avatar answered Sep 28 '22 14:09

Adam


Press Ctrl+H and the Replace dialog will open, then follow the steps:

  1. type \r\n in "Find what".
  2. type \\\r\\\n in "Replace with"
  3. select search mode to Extended (\r, \n, \t, \x, ..., \0)
  4. click Replace button It works for me to display \r\n. see my screenshot
like image 39
yuc Avatar answered Sep 28 '22 14:09

yuc