How to remove empty lines with regex in Notepad++?

5 points
Asked by:

Is there a way I can delete all empty lines with regex with Notepad++?

I know I can achieve it from UI by click on:

  • Edit
  • Line Operations
  • Remove Empty Lines

But is there a way to do it with regex?

For example I have:

line 1

line 3

line 5

line 8

After empty files are removed:

line 1
line 3
line 5
line 8


0 answers
Hey 👋
Would you like to know what we do?
  • Dirask is a friendly IT community for learners, professionals and hobbyists to share their knowledge and help each other in extraordinary easy way.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.