-1

I'd like to remove all rows in a .txt using regex in Notepad2. Example:

Remove all rows not containing the word Engineer:

Erik, 35, CEO
John, 24, Engineer
Stan, 22, Sales
Bill, 21, Operations
Katie, 31, Sales

Is there a simple solution to this problem ?

4

2 回答 2

2

You can use the following regex to match those rows:

^(?!.*?Engineer).*$

and then replace with empty string "".

于 2013-10-18T13:29:19.793 回答
0

Replace ^(?!.*Engineer).*$ with nothing - should do the trick!

于 2013-10-18T13:30:41.767 回答