This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Regular Expression needed. 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 "Regular Expression needed." Watch "Regular Expression needed." New topic

Regular Expression needed.

kiranb reddy

Joined: Sep 28, 2008
Posts: 20
Can someone give the regular expression pattern for replacing all the characters in the String by "\" to "/"

For example:

I have a String with: C:\dev\example

I need to change the pattern to: C:/dev/example.

Please help to solve the above problem,

Thanks in advance,

Shashank Agarwal
Ranch Hand

Joined: May 20, 2004
Posts: 105
Try -
kiranb reddy

Joined: Sep 28, 2008
Posts: 20
Thank you.
I agree. Here's the link:
subject: Regular Expression needed.
Similar Threads
String replacement
Not as good as in Ruby?
Regular expression pattern ${* }
I don't think I understand how Regular Expression works!
java regular expression problem