This repository has been archived by the owner. It is now read-only.

% sign not accepted #12

Closed
csakai opened this Issue Jun 16, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@csakai

csakai commented Jun 16, 2015

I tried entering the following regex into the regexper web app:
%[a-zA-Z0-9]{2}

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

@javallone

This comment has been minimized.

Show comment
Hide comment
@javallone

javallone Jun 16, 2015

Owner

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

Owner

javallone commented Jun 16, 2015

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

@csakai

This comment has been minimized.

Show comment
Hide comment
@csakai

csakai Jun 16, 2015

This was the url that was formed by putting this request through firefox 38.0:
http://regexper.com/#\%25[a-zA-Z0-9]{2}

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.

csakai commented Jun 16, 2015

This was the url that was formed by putting this request through firefox 38.0:
http://regexper.com/#\%25[a-zA-Z0-9]{2}

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.

@javallone

This comment has been minimized.

Show comment
Hide comment
@javallone

javallone Jun 16, 2015

Owner

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.

Owner

javallone commented Jun 16, 2015

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.

@javallone javallone closed this in e1f5891 Jun 17, 2015

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.