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

Regex syntax question #1209

Closed
ammnt opened this issue Nov 26, 2019 · 3 comments
Closed

Regex syntax question #1209

ammnt opened this issue Nov 26, 2019 · 3 comments
Labels

Comments

@ammnt
Copy link

ammnt commented Nov 26, 2019

Hello,

i want to block all subdomains blog. for all domains and create this rule:
/blog.*/

In this case also blocked subdomains like:
blogs.
blogger.
blogging.
domain.blog.com
test.blogs.net.co
etc.

How do I properly write a regular expression to avoid this? How do I properly write a regular expression to avoid this?

Thank you.

@ameshkov
Copy link
Member

Do you really need regex for this?

Why not ||blog. ?

@ammnt
Copy link
Author

ammnt commented Nov 26, 2019

Do you really need regex for this?

Why not ||blog. ?

Thanks for the answer, but I 'm not sure... I ask about regular expressions as Pi-Hole supports something similar:
https://raw.githubusercontent.com/mmotti/pihole-regex/master/regex.list

@ameshkov
Copy link
Member

I am not a fan of regular expressions.

Prefer adblock-style syntax when it's possible. It is easier to use and it will work much faster than regular expressions:
https://github.com/AdguardTeam/AdGuardHome/wiki/Hosts-Blocklists

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

No branches or pull requests

2 participants