Notepad++ is a free text editor for Windows. Follow the steps below to replace blank lines in a file
Method 1
Go to Edit -> Line Operations -> Remove Empty Lines or Remove Empty Lines (Containing Blank characters)
Method 2
Notepad++ supports regular expression search and replace that can be used to replace blank lines in one or more files. Follow the steps below to replace blank lines
- Press Ctrl + h to open ‘Replace’ pop up
- Write one of the following regex in find what box.
[\n\r]+$
or^[\n\r]+
- Leave the ‘Replace with’ empty
- Check the Wrap around option.
- Select the Regular expression search mode.
- Click on the Replace All button.