Remove All Lines except lines with a Specific Word - Notepad++
Very Simple way
- Press CTRL+F and Type the word or pattern.
- Click on "Find all in Current Document"
4) You get the filtered lines. Copy them to a new file.
1- Assume this is your file and you want to delete all lines which doesn't have "WScript" in it.
2- Do a regex find as shown below. BookMark all the required lines.
3- Then remove the unmarked lines