How big of a text file are we talking about?
For me, I have some utilities I've made for small text files. Read the whole file into a
string array, make the changes, write the file back out.
For bigger files, you'll need an in stream and an out stream. Read the line, make changes if you need to, write the line. Repeat until done. Close files.