wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 347
Do you know why?

check here for an explanation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: replaceAll() from "/" to "\"
 
Similar Threads
Cleared...96%
GC behavior on Serializable objects
Can I sort String arrays?
Passed SCWCD with 92%
String and for Loop Confusion