EN
Remove empty lines with regex in Notepad++
23
points
In this article we are going to look how to remove empty lines with Notepad++.
Presented below solution uses regex to do it (uses regular expressions).
Quick steps:
- open Notepad++,
- go to Replace window (in menu Search -> Replace... or press ctrl + H),
- in Search Mode group-box select Regular expression radio button,
-
enter below regex in Find what input:
^\R
-
enter below line in Replace with input:
>> Leave it EMPTY <<
-
click on Replace All button
-
Text before:
line 1 line 2 line 3 line 4
-
Text after:
line 1 line 2 line 3 line 4
Look at below screenshots: