G Guest Mar 10, 2004 #1 Hi How to open a text file, seeking for a word and delete the line containing this word Thanks Ayma
P Peter Rilling Mar 10, 2004 #2 1) Open the file with a TextReader. 2) Read each line. 3) scan the line for the target word (maybe using a regular expression). 4) If the word does not exist, write the line to a TextWriter.
1) Open the file with a TextReader. 2) Read each line. 3) scan the line for the target word (maybe using a regular expression). 4) If the word does not exist, write the line to a TextWriter.