?
Solved

replace backslashes by slashes

Posted on 2007-12-07
7
Medium Priority
?
2,905 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 400 total points
ID: 20426628
s = s.replaceAll("\\\\", "/");
0
 
LVL 26

Assisted Solution

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

Accepted Solution

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

s = s.replace('\\', '/');
0
Technology Partners: 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 600 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

Independent Software Vendors: 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!

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses
Course of the Month7 days, 21 hours left to enroll

765 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