java.util.regex.PatternSyntaxException: Dangling meta character '?'
843785Oct 13 2008 — edited Oct 13 2008I get error: java.util.regex.PatternSyntaxException: Dangling meta character '?' near index 0
in my code when I try to do this: String[] urlSplit = url.split("?");
The value of url = http://www.google.com/search?q=document.referrer
I'm pretty certain that '?' is an illegal character in regex and thats what is causing this, but I'm not sure how to fix this problem. I want to be able to split my string at the '?' as well.
Thanks.
Brian