Notepad++ - How can I replace blank lines [duplicate]
Press Ctrl+H (Replace)
Select
Extended
fromSearchMode
Put
\r\n\r\n
inFind What
Put
\r\n
inReplaceWith
Click on
Replace All
As of NP++ V6.2.3 (nor sure about older versions) simply:
- Go menu -> Edit -> Line operations
- Choose "Remove Empty Lines" or "Remove Empty Lines (Containing white spaces)" according to your needs.
Hope this helps to achieve goal in simple and yet fast way:)
By the way, in Notepad++ there's built-in plugin that can handle this:
TextFX -> TextFX Edit -> Delete Blank Lines
(first press CTRL+A to select all).