Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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.
Consider Paul's rocket mass heater.
subject: Regular Expression needed.