How do I delete specific lines in Notepad++?

Notepad++ v6.5

  1. Search menu -> Find… -> Mark tab -> Find what: your search text, check Bookmark Line, then Mark All. This will bookmark all the lines with the search term, you’ll see the blue circles in the margin.

  2. Then Search menu -> Bookmark -> Remove Bookmarked Lines. This will delete all the bookmarked lines.

You can also use a regex to search. This method won’t result in a blank line like John’s and will actually delete the line.

Older Versions

  1. Search menu -> Find… -> Find what: your search text, check Bookmark Line and click Find All.
  2. Then Search -> Bookmark -> Remove Bookmarked Lines

Leave a Comment