Search code examples
regexeditorwhitespacepspad

Remove empty line / lines in PSPad using regexp


I was wondering how to delete empty lines or just any line in PSPad using regexp.
It can not be done with regexp, however there is a way - so:
I wanted to share the knowledge => see my answer below...


Solution

  • Removing the line in PSPad

    PSPad (unlike e.g. Notepad++) does not allow you to remove lines using regexp at all, if you are thinking about using ^YOU_REG_EXP$ replacing with "nothing", it will not work, however you can pre-clean the lines like that.

    Removing empty lines in PSPad:

    In top menu go to Edit -> Lines manipulation and choose one of these options:

    • Remove Blank Lines Remove Redundant
    • Blank Lines (leave at least one blank line)

    Removing empty lines in PSPad