петък, януари 06, 2023

Notepad++ replace/remove a line containing sting

 

Replace/remove the line containing word < string>

 

Find/Replace dialog and with regex:

 

1.  Ctrl + h to bring up the find replace dialog.

2.  In the Find what: text box include your regex: .*string.*\r?\n (where the \r is optional in case the file doesn't have Windows line endings).

3.  Leave the Replace with: text box empty.

 

    Make sure the Regular expression radio button in the Search Mode area is selected. Then click Replace All and voila! All lines containing your search term help have been removed.

 

 

  • 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 SearchBookmarkRemove Bookmarked lines
  • Done.

Няма коментари: