The backslash is only used to prevent the
shell from processing special characters. There's no reason to deal with backslashes yourself - if you write a regex, you aren't dealing with any backslashes that might be in the query string as well, are you?