From 3a664675b5e8057b29315bbd2216b2939ed219c8 Mon Sep 17 00:00:00 2001 From: CodeX Date: Tue, 7 Apr 2026 21:45:35 +0200 Subject: [PATCH] Document supported pattern syntax in README Add a Pattern syntax section listing the five pattern forms accepted by qBittorrent's excluded file names (suffix, prefix, contains, exact, regex), which are the same forms that the entries in blacklist and whitelist must use. Note that the merge script subtracts whitelist from blacklist as exact strings regardless of pattern form, so equivalent patterns written differently are not interchangeable. --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 2d58ecf..d5e48e8 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,29 @@ from upstream. Removals must go through the whitelist. See [Lists](https://git.hisp.no/arr/blocklists/wiki/Lists) for the full rules and worked examples. +## Pattern syntax + +Each line in `blacklist` and `whitelist` is a pattern in one of the +following forms (the same forms that qBittorrent's excluded file names +accepts, since that is where blacklist patterns end up via Cleanuparr's +Blocklist Sync): + +| Form | Example | Matches | +|---|---|---| +| `*example` | `*.srt` | File name ends with `example` | +| `example*` | `sample*` | File name starts with `example` | +| `*example*` | `*sample*` | File name contains `example` | +| `example` | `RARBG.txt` | File name is exactly `example` | +| `regex:` | `regex:.*\.srt$` | File name matches the regex | + +The merge script subtracts the whitelist from the blacklist as **exact +strings**, not by pattern semantics. To remove a pattern from the +blacklist, the whitelist line must be byte-for-byte identical to the +blacklist line. `*.srt` in the whitelist strips `*.srt` from the +blacklist; it does **not** strip `regex:.*\.srt$` even though both +patterns describe the same files. See +[Lists](https://git.hisp.no/arr/blocklists/wiki/Lists) for the full rules. + ## Sync schedule The Gitea Actions workflow runs every 7 days at 04:00 UTC and on manual -- 2.52.0