I want to delete the whole line if the line contains a specific word for example \"cat\".
If \"cat\" is in this line, delete the whole
Not necessarily a regex needed here
Go to the search menu Ctrl+F (Strg+F, bzw. Suchen - Suchen)
On the "Mark" tab, enter the word in the "Find what" field (Im "Vorkommnisse markieren" tab, das Scuhwort in "Suchen nach" eingeben)
Check "Bookmark line" (Haken bei Lesezeichen setzen)
Press "Mark all" ("Alle suchen")
Goto Search - Bookmark - Remove Bookmarked lines (Im Menü Suchen - Lesezeichen - Zeilen mit Lesezeichen löschen auswählen)
==> you are done
It is a two step process in notepad++. First do a regex replace
Find what: ^(.*?)(cat)(.*?)$
Replace with:
Next do a extended replace with
Find what: \r\n\r\n
Replace with: \r\n
Assuming your file was created on Windows. However this will also remove all lines that previously had no content.
Edit: Probably better to do the bookmark thing the other guy suggested.
You need something like:
[a-z]*cat[a-z]*
I don't know if you have spaces or other special caracters...