How do I change or replace all instances of a character in a text file to a newline/line break/EOL in Notepad2 or Notepad++?

3

1

I tried Notepad2's 'Replace Text' function, but I don't know what to put in the 'Replace with' field.

The OS I'm using is Windows 7.

galacticninja

Posted 2011-06-09T07:28:42.110

Reputation: 5 348

Answers

5

Notepad2
Search mode: Regular expression search
Replace with: \r\n

Notepad++
Search mode: Extended (or Regular expression)
Replace with : \r\n

enter image description here

njd

Posted 2011-06-09T07:28:42.110

Reputation: 9 743

Thanks! Know if this can also be done with Notepad2? – galacticninja – 2011-06-10T09:54:30.980

Sorry, @galacticninja - I don't use Notepad2, but I expect there's something similar in its search facility: I think you tick the box for "Regular expression". – njd – 2011-06-10T10:36:24.757

1Yes: as I thought, Regular expression search does the job in Notepad2. I've updated my answer. – njd – 2011-06-10T10:48:51.713