Notepad++ - How can I replace blank lines

Joeblackdev picture Joeblackdev · Aug 7, 2011 · Viewed 193.2k times · Source

I have a text file with a thousand lines of numbers like so:

402

115

90

...

As you can see there is a blank line in between each number that I want to remove so that I have

402
115
90
...

How can I do this?

Answer

YetAnotherUser picture YetAnotherUser · Aug 7, 2011
  1. Press Ctrl+H (Replace)

  2. Select Extended from SearchMode

  3. Put \r\n\r\n in Find What

  4. Put \r\n in ReplaceWith

  5. Click on Replace All

Replace multiple line breaks