Hi,
[code=java]
String s = "hello in the (?hell?)";
s = s.replaceAll("? ", "\"");
[/code]
i hav a string s as shown above
i want to replace ? with "
the output should be like
hello in the ("hell")
i tried the using replaceAll replaceAll("(?" , "\"");
but i am getting an error like
java.util.regex .PatternSyntaxE xception: Dangling meta character '?' near index 0
can anyone suggest me how to go ahead with this.
Regards
Raj
[code=java]
String s = "hello in the (?hell?)";
s = s.replaceAll("? ", "\"");
[/code]
i hav a string s as shown above
i want to replace ? with "
the output should be like
hello in the ("hell")
i tried the using replaceAll replaceAll("(?" , "\"");
but i am getting an error like
java.util.regex .PatternSyntaxE xception: Dangling meta character '?' near index 0
can anyone suggest me how to go ahead with this.
Regards
Raj
Comment