Solved

replace backslashes by slashes

Posted on 2007-12-07
7
2,901 Views
Last Modified: 2013-12-29
Hello,

I want to replace backslashes "\" by slashes "/" in a  string.

Thank you !
0
Comment
Question by:matthew016
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 92

Assisted Solution

by:objects
objects earned 100 total points
ID: 20426628
s = s.replaceAll("\\\\", "/");
0
 
LVL 26

Assisted Solution

by:ksivananth
ksivananth earned 50 total points
ID: 20426629
string.replaceAll( "\\\\", "/" ) ;
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 200 total points
ID: 20426651
More efficient:

s = s.replace('\\', '/');
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Assisted Solution

by:ysnky
ysnky earned 150 total points
ID: 20426703
0
 
LVL 9

Author Comment

by:matthew016
ID: 20426980
okkk thanks !!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 20427041
:-)
0
 
LVL 92

Expert Comment

by:objects
ID: 20427627
its not more efficient btw :)
not even the same thing
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question