Skip to content

Instantly share code, notes, and snippets.

@anwerashif
Last active October 30, 2017 17:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anwerashif/eb613d6927a95f09c542107b13aafeec to your computer and use it in GitHub Desktop.
Save anwerashif/eb613d6927a95f09c542107b13aafeec to your computer and use it in GitHub Desktop.
Remove Empty Lines and Spaces in Notepad++
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment