I have a file with lots of lines. Some of them contain the word “broomstick” (not his real name). I’d like to delete all the lines that DO NOT contain broomstick.
Tried various combinations building off
^.broomstick.\n
which is exactly what I DON’T want to delete. I gather that the ^ at the beginning of a set will complement the set but couldn’t make it work.
Is there a way? Thanks!