How do I replace the string "\r\n" with the same characters?
Example:
Hello World.\r\nHello World.
replaced with:
Hello World.
Hello World.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityPress CTRL-h and the Replace dialog will open. Type \\r\\n
in "Find what" and \r\n
in "Replace with". Finally, select search mode Extended (\r, \n, \t, \x..., \0) and click "Replace All".
In the find screen, on the replace tab choose extended search.
In the find text box put \\r\\n
, and in the replace text box put \r\n
.
I tried the top voted answer, but I couldn't get it to work for my newer version of Notepad++. I had to reverse what they did. So:
Press CTRL-h
and the Replace dialog will open. Type \r\n
in "Find what" and \\r\\n
in "Replace with". Then select search mode Extended (\r, \n, \t, \x..., \0) and click "Replace All".
Literally what Marcus did but reversed worked for me.
\r\n
in the file, whereas the question is about converting the literal \r\n
to new lines
Copy a newline and use the Search and Replace function to replace \r\n with the newline. The newline character will show up as an empty box.