Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL regex matching not working #314

Open
luispabon opened this issue May 19, 2017 · 4 comments
Open

URL regex matching not working #314

luispabon opened this issue May 19, 2017 · 4 comments

Comments

@luispabon
Copy link

URLs matching the regex option doesn't seem to be working. For instance, adding jenkins doesn't match the url https://jenkins.

I've tried explicitly adding the slash delimiters, with and without case sensitive modifier...

@myfonj
Copy link

myfonj commented May 19, 2017

Regex must match entire URL, not just part. .*jekins.* should work.

Btw, good to know, the are (technically) no URLs without slash after domain, despite they are often displayed this way.

@luispabon
Copy link
Author

luispabon commented May 19, 2017

Thank you, .*jenkins.* does the trick for me. Probs worth mentioning on Stylish's UI that the whole URL, including the protocol, need matching. The current wording is misleading, as jenkins indeed matches http://jenkins hence my confusion.

@myfonj
Copy link

myfonj commented May 19, 2017

Yup. Or perhaps make attractive link to the docs [1], which BTW mentions that

regexp - for advanced matching with wildcards (including the protocol)

and also

The regular expression you write must match the entirety of the URL. This means that using ^ and $ (to match the beginning and end of the string) are unnecessary.

(emphasis mine).

[1] https://github.com/stylish-userstyles/stylish/wiki/Applying-styles-to-specific-sites

@luispabon
Copy link
Author

A link to the docs would do nicely I reckon 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants