Hi there
This has been discussed before but I'm afraid I lost the plot and couldn't work out how to proceed
I have a text file, eg:
a
b
c
I need to be able to search the text file for (eg) "b" and replace with "d" thus ending up with a saved text file of:
a
d
c
What's the easiest way to do this please?
I've thought of loading the file line by line and checking the currently loaded line against a variable and if they match then write at that point into the file after deleting the line... but again I'm lost on this.
To be honest I'd be happy if the output was:
a
c
d
Thanks once again!
-Colin
This has been discussed before but I'm afraid I lost the plot and couldn't work out how to proceed
I have a text file, eg:
a
b
c
I need to be able to search the text file for (eg) "b" and replace with "d" thus ending up with a saved text file of:
a
d
c
What's the easiest way to do this please?
I've thought of loading the file line by line and checking the currently loaded line against a variable and if they match then write at that point into the file after deleting the line... but again I'm lost on this.
To be honest I'd be happy if the output was:
a
c
d
Thanks once again!
-Colin