From b0dac57146b9d5e5d2353ca7dc0735afd734c8d9 Mon Sep 17 00:00:00 2001 From: garry-ut99 <72945564+garry-ut99@users.noreply.github.com> Date: Sun, 7 Jul 2024 07:41:27 +0000 Subject: [PATCH] Updated "regex-based..." (updated description + more examples) --- Static-filter-syntax.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Static-filter-syntax.md b/Static-filter-syntax.md index bf55f78..d0c13aa 100644 --- a/Static-filter-syntax.md +++ b/Static-filter-syntax.md @@ -955,10 +955,12 @@ Since the base domain name gets used to derive the name of the "entity", `google #### Hostname regex -Starting with [1.46.1b15](https://github.com/gorhill/uBlock/commit/81498474d6d440b032681aa9952d593749b39efb), you can use regex-based values as target domain (hostname) for static extended filters. Examples of usage: +Starting with [1.46.1b15](https://github.com/gorhill/uBlock/commit/81498474d6d440b032681aa9952d593749b39efb), you can use regex-based values as target domain (hostname) for static extended filters, works in base hostname, and also in filter options like: `domain=`, `to=` and `from=`. Examples of usage: Solves: [regex-fied domain](https://github.com/uBlockOrigin/uBlock-issues/discussions/2234): - `/img[a-z]{3,5}\.buzz/##+js(nowoif)` - matches (example): `imgabcd.buzz` + - `@@*$ghide,domain=/img[a-z]{3,4}\.buzz/` - matches (example): `imgabcd.buzz` in `domain=` filter option + - `*$frame,from=plainlight.com,to=~/youtube/` - excludes domains containing word "youtube" in `to=` filter option Solves: [Add support for domain double wildcarding in hiding rules (Would be a huge gamechanger for Nitter)](https://github.com/uBlockOrigin/uBlock-issues/issues/2905): - `/^nitter\.[^.]+\.[^.]+$/##.timeline-item:has-text(owned)` - matches (example): `nitter.abc.com`, but not `nitter.com` and not `nitter.abc.xyz.com`