Remove empty lines and spaces in Notepad++?
回答1
To get rid of leading space(s) and all empty lines (even if the empty line contains spaces or tabs)
- Go to Search -> Replace
- Select "Regular expression" under Search mode.
- Use
^\s*
for "Find what" and leave "Replace with" blank. - Click Replace all
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.
回答2,
用菜单里面自带的功能
Edit -> Line Operations -> Remove Empty Lines or alternatively: Edit -> Line Operations -> Remove Empty Lines (Containing Blank characters)
标签:++,lines,notepad,Remove,spaces,Notepad,empty From: https://www.cnblogs.com/chucklu/p/17069591.html