How to Remove Empty Lines and Spaces in Notepad++

How to Remove Empty Lines and Spaces in Notepad++

wprocket

To get rid of leading space(s) and all empty lines (even if the empty line contains spaces or tabs) follow the followings:

wprocket-728x98_Black

  1. Go to Search -> Replace
  2. Select “Regular expression” under Search mode.
  3. Use ^\s* for “Find what” and leave “Replace with” blank.
  4. 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.

Instead Use the following Tool to Remove Empty Lines and Spaces

Input Text

 

Output Text

 

GenesisPro728x90

Facebook
Twitter
LinkedIn
Pinterest
Tumblr
Anwer Ashif

Anwer Ashif

Founder of RainaStudio. Help businesses and individuals to create and outstand their online presence. Our success rate is measurable. Our blog served all around the world and counting.

Leave a Reply

Your email address will not be published. Required fields are marked *