I have a multiline text string, that looks like:
AAAA BBBBBB
BBBB VVVV XXXX
CCCCCCCC XXXX
I'd like to come up with a small function that removes an entire line if it contains a word/phrase , so that for above if I lets say sent in 'VVV' as a paremeter the output would be:
AAAA BBBBBB
CCCCCCCC XXXX
There are many examples on stackoverflow, eg Remove lines that contain certain string, which show how to do this for a file, but I'm not sure how without opening a file.