Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

replace a string in a file using Java  RSS feed

 
terry Kiernan
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!