How to use Regex to move everything onto one line in notepad++

user3153443 picture user3153443 · Apr 7, 2014 · Viewed 60.5k times · Source

I'm trying to figure out how to use Regex to merge the contents of my text file

(25 lines of data) into one line.

So far, I can get Notepad++ to successfully find the lines I'm looking for by making it search for (^) , but what I'm unsure of is what is what to replace it with.

Syntax-wise I'm looking for the correct script that essentially attaches the beginning of one line to the end of the previous one. Can anyone help? Thanks

Answer

user694733 picture user694733 · Apr 7, 2014

Find \R and replace with empty string.

\R matches multiple linebreak styles, including most common \r\n and \n.

Search Mode must be set to Regular expression.