Prajan
New Member
Hi All
How can I search and replace a word in a .p file ? I have a .p file and I need to write a program that searches a word given as input by me and replaces that word by the new word given by me.
I tried it to do it using the stream. I got the whole file in a stream too and extracted a single line and find that paticular word too, but that didnt solve my problem since i cant replace that word in that stream and cant save in that .p file.
So i need some ideas for how can i do so ?
Hope to get some ideas .
Regards
Prajan Shrestha
How can I search and replace a word in a .p file ? I have a .p file and I need to write a program that searches a word given as input by me and replaces that word by the new word given by me.
I tried it to do it using the stream. I got the whole file in a stream too and extracted a single line and find that paticular word too, but that didnt solve my problem since i cant replace that word in that stream and cant save in that .p file.
So i need some ideas for how can i do so ?
Hope to get some ideas .
Regards
Prajan Shrestha