wood burning stoves*
The moose likes Beginning Java and the fly likes replace a string in a file using Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "replace a string in a file using Java" Watch "replace a string in a file using Java" New topic
Author

replace a string in a file using Java

terry Kiernan
Ranch Hand

Joined: Aug 23, 2008
Posts: 31
Hi ,

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

Thanks
[ August 23, 2008: Message edited by: nanoj ]
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

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.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: replace a string in a file using Java