Delete all lines (not) matching a regex using Notepad++
问题 How to delete all lines matching or not matching a regex in Notepad++? In Vim, I'd do the following to delete all matching lines: :g/regex/d And to delete all non matching lines: :!g/regex/d I'm looking for these commands' equivalent in Notepad++. As also explained in "Notepad++ - delete all lines with certain text", I usually go for the approach of blanking the matching lines and deleting the blank lines afterwards. Is there a simpler way? As per this answer, versions of Notepad++ >= 6.0