in reply to delete data from file
School is starting again. So in general terms...
If you keep two file pointers (one read and one write), open the file read/write, and scan until your first match. Move the read file pointer to the end of the paragraph and the writer to the beginning of the paragraph. Now read from one and write to the other, skipping the write when the read runs into your key string. At the end, make sure you truncate to the end of the file.
Update: Forgot to truncate
--MidLifeXis
|
---|