Remove lines with certain strings with Notepad ++

A tutorial that will help you get rid of those unwanted text lines with strings or text you don't want or replace all of them at once.

This is a simple enough tutorial that will help you get rid of those unwanted text lines with strings or text you don’t want or replace all of them at once or just count without the need to do them manually. We are going to use Notepad++ which you can freely download from Sourceforge.net .

So after you are done downloading and installing Notepad++, just open the text file into the program. Then open up the Find an Replace window by pressing “Ctrl+h“.

In the find and replace window, Choose the “Regular Expression” as the search mode.

Then on the find text field type ^.*String.*$

The String text is to be removed by the string of your choice.

So if you are removing everyone in the list with the name Michael. This would be of format ^.*Michael.*$

replace lines with same string

This is how you can easily replace lines with same string or text. This will however not work with text with . and special characters.

Leave a Reply