Delete the lines with matching pattern
Go to the search menu Ctrl+F and open the “Mark” tab.
Check “Bookmark line” (if there is no “Mark” tab update to the current version).
Enter your search term and click “Mark All”
All lines containing the search term are bookmarked.
Now go to the Menu “Search -> Bookmark -> Remove Bookmarked lines”