Text file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
How to open a text file, seeking for a word and delete the line containing this word
Thanks
Ayma
 
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.
 
Back
Top