Can anyone help me figure out how to search for a string in a text file,
then delete the whole line of text that it occurs in?
For example: I have a text file which contains the following.
//****** text.txt ******
Keep this line.
Also keep this line.
Delete this line.
Keep this one too.
Now I want to do a search on this text file for the word "delete" and if
it finds that word, it will delete the whole line it occurs on. So
after this, the text file will look like this one:
//****** text.txt ******
Keep this line.
Also keep this line.
Keep this one too.
Can anyone help me with this? Thanks.
Matt