I tried entering the following regex into the regexper web app:
in order to look for special characters in URLs (ie: %20 for whitespace)
I got a message: Malformed expression in URL.
when breaking down the regex, I find that everything works except for %
Therefore, it would appear regexper can't handle %, escaped or not
I suspect this may be due to your browser not encoding the regex into the URL correctly. I've tried the regex you provided in Chrome and it rendered successfully.
Could you please post the URL you end up at when you get that error along with your web browser details (at the very least which browser you're using). Also, could you try loading this URL (it is the URL I get from Chrome): http://regexper.com/#%5C%25%5Ba-zA-Z0-9%5D%7B2%7D and let me know if it renders or if you receive the same error
This was the url that was formed by putting this request through firefox 38.0:
I just noticed how wacky that looks. Weirdly, when I hover over your link, it looks the same as the URL I got. I try copy-pasting it to the location bar, and it resolves to the same URL again. Very strange behavior.
Looks like this is due to a long-standing Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=483304
I'm going to add a work-around to detect Firefox's odd behavior.
Support for FF's buggy location.hash
FF decodes location.hash for you, so decoding is unnecessary and breaks
when the regex contains a "%"