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

Regular Expressions Not Working #42

Closed
afrazkhan opened this issue Jun 5, 2020 · 2 comments
Closed

Regular Expressions Not Working #42

afrazkhan opened this issue Jun 5, 2020 · 2 comments

Comments

@afrazkhan
Copy link

Expected Behavior

Something like .*pinterest.* should block any URL containing the string "pinterest" (this example is aggressively greedy for the sake of simplicity).

Actual Behavior

Doesn't ;)

Specifications

  • OS: MacOS
  • Browser: Firefox 76
  • Other extensions that might interfere: None that I know of
@iorate
Copy link
Owner

iorate commented Jun 5, 2020

uBlacklist requires regular expression literals in JavaScript. /.*pinterest.*/ (surrounded by /) will work. (In this case, /pinterest/ is more efficient)

@afrazkhan
Copy link
Author

Yup, my bad. Adding the surrounding / works perfectly.

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