Solved

replace backslashes by slashes

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

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

Thank you !
0
Comment
Question by:matthew016
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

760 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now