Forums Register Login

replace a string in a file using Java

+Pie Number of slices to send: Send
Hi ,

Anyone know a simple way i can replace a string in a file using java ?

Thanks
[ August 23, 2008: Message edited by: nanoj ]
+Pie Number of slices to send: Send
Welcome to JavaRanch!

After checking your private messages, take a look at the String class in the API, which has various replace methods.

Or is your question about file handling? If so, you will need to give us more information about what you've tried and where you're stuck.
My first bit of advice is that if you are going to be a mime, you shouldn't talk. Even the tiny ad is nodding:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 3208 times.
Similar Threads
Replacing a word in a text file
replacing a regex wild card
Code to Modify the contents of a file
How to replace data in a file
Editing html tags in a *.htm file
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 17:47:01.