Suppose I have these lines:
A
B
C
D
E
I want remove empty lines, and the spaces before the letter too, like this:
A
B
C
D
E
How can I achieve this in Notepad++?
notepad
Suppose I have these lines:
A
B
C
D
E
I want remove empty lines, and the spaces before the letter too, like this:
A
B
C
D
E
How can I achieve this in Notepad++?
Best Answer
To get rid of leading space(s) and all empty lines (even if the empty line contains spaces or tabs)
^\s*
for "Find what" and leave "Replace with" blank.Regex explanation:
^
means beginning of the line\s*
means any number (even 0) of whitespace characters. Whitespace characters include tab, space, newline, and carriage return.