you can replace all question marks ("?") with "\?"
Let's say I have a String, and I want to delete some parts of this string, one part with the URL in it. Like this:
String longstring = "..."; //This is the long String String replacestring = "http://test.com/awesomeness.asp?page=27"; longstring.replaceAll(replacestring, "");
But! As far as I understand, you cannot use the replaceAll () method with String, which contains one question mark, you should make them like "\?" . first.
So the question is: Is there a way to replace the question marks with "\?" in line? And no, I can just change the line.
Thanks in advance, I hope someone understands me! (Sorry for the bad English ...)
Guiceu
source share