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.
This commit is contained in:
CodeX
2026-04-07 21:45:35 +02:00
parent 182b825af2
commit 3a664675b5
+23
View File
@@ -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>` | `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