Mac – Find multiple blank lines in Notepad++ and join the separated text lines

join;macrosnotepad

How to find multiple blank lines in Notepad++ and join the the separated text lines with a macro?

Below is screenshot of the file, where I want a macro to find out this blank line and correct the SEE and FIGURE should come to one line.

picture of the file

Best Answer

  • Ctrl+H
  • Find what: \R{2,}
  • Replace with: LEAVE EMPTY
  • check Wrap around
  • check Regular expression
  • Replace all

Explanation:

\R{2,}  : 2 or more any kind of linebreak, '\r' or '\n' or '\r\n'
Related Question