This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes replaceAll() from Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "replaceAll() from "/" to "\"" Watch "replaceAll() from "/" to "\"" New topic
Author

replaceAll() from "/" to "\"

Ananth Chellathurai
Ranch Hand

Joined: Nov 21, 2007
Posts: 349

Hi All,

I have a string which has forward slashes, I need to replaceAll("/", "\\") which leads me to Exceptions.



Any help on how to do this will be appreciated.

Ananth Chellathurai
[ September 15, 2008: Message edited by: Ananth Chellathurai ]

Ananth Chellathurai [Walk on software]
Ananth Chellathurai
Ranch Hand

Joined: Nov 21, 2007
Posts: 349

Figured out like this.



Ananth Chellathurai
Gamini Sirisena
Ranch Hand

Joined: Aug 05, 2008
Posts: 357
Do you know why?

check here for an explanation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: replaceAll() from "/" to "\"