问题
I am trying to REMOVE lines in a MULTIPLE text files with a particular word. Is this possible in Notepad++?
At the moment, I can replace those lines with a blank line. However how do I remove them in multiple files within a directory? I tried the "Mark" method whereby we can remove lines however it seems only possible for single file.
Thanks!
回答1:
Go to Search > Find in Files menu (shortcut CTRL+Shift+F) and do the following:
Find what:
<Brand>Acer<\/Brand>\r?\n?Replace:
[leave empty!]Directory: select the directory with your files
Search mode: select radio button "Regular Expression"
Then press
Replace in Files(actually press first theFind Allto be sure that it works, and then the Replace).
来源:https://stackoverflow.com/questions/20369180/notepad-remove-line-with-specific-word-in-multiple-files-within-a-directory