Wednesday, November 15, 2017

Notepad++: Remove all lines containing a certain word/sentence/regex

In Notepad++ (a wonderful Program!) you can easily delete all LINES containing a certain word/sentence or regex.

It's basically a two step process.


You need to find all lines that containing your search string. 

  • Open the search window (CTRL+F)
  • Choose the Mark tab
  • Insert the string you want to search for 
  • Select the Bookmark line
  • Press Mark All.

Now from the Notepad++ Menus, choose:
Search -> Bookmark -> Remove Bookmarked Lines

That's it!

No comments:

Post a Comment

Your comment will be visible after approval.