Top community members

Welcome to Dirask IT community! ‚̧ ūüíĽ
We are community of people that helps each other.

If you are beginner in IT field, you are more then welcome to ask questions, it will help you to learn faster. We are here to help you.

We are always beginner in something, we just need to remember it along the way.

there are no wrong questions - Ask Question

[Edit]
EN

Remove empty lines with regex in Notepad++

11 points
Created by:
AnnLen
1662

In this article we are going to look how to remove empty lines with Notepad++.

Presented below solution uses regex to do it (uses regular expressions).

Quick steps:

  1. open Notepad++,
  2. go to Replace window (in menu Search -> Replace... or press ctrl + H),
  3. in Search Mode group-box select Regular expression radio button,
  4. enter below regex in Find what input:

    ^\R
  5. enter below line in Replace with input:

    >> Leave it EMPTY <<
  6. click on Replace All button

  • Text before:

    line 1
    
    
    line 2
    
    line 3
    line 4
  • Text after:

    line 1
    line 2
    line 3
    line 4

Look at below screenshots:

Remove all empty lines with regex in Notepad++
Remove all empty lines with regex in Notepad++
Removed all empty lines with regex in Notepad++
Removed all empty lines with regex in Notepad++

 Reference

  1. Notepad++ - Wiki
  2. Download Notepad++

Checkout latest Findings & News:

Checkout latest questions:

Checkout latest wiki articles:

Hey ūüĎč
Would you like to know what we do?
  • Dirask is IT community, where we share coding knowledge and help each other to solve coding problems.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.
Read more