Find and replace text in a text file

can anyone help writing the code to find and replce text in a text file, the path will be included in the code, PLz help..!!!
We can help, but you first have to show that you're at least potentially capable of doing it yourself. Perhaps show some of your own code? Or at the very least explain your problem somewhat more...
I actually want to remove the serial numbers from a text file. so i want to generate a loop which has the variable which gets greater by 1 each time, and that variable is compared with the text and removed. i dont know the function for replacing actually to include it in the loop.. hope u will help.
Can you give some lines of the text file so we can see the format it is in?
it like;


0001

..............

0002

............

0003

and so on

I want to remove these serial numbers,
Just read all lines and write those lines that aren't serial numbers into another file.
Or read all lines into a vector, then filter out the SNs and write the rest back to the original file.
Topic archived. No new replies allowed.