Merge pull request 'Distinguish qBittorrent and Cleanuparr pattern syntax in README' (#7) from docs/pattern-syntax-consumers into main

Reviewed-on: #7
This commit was merged in pull request #7.
This commit is contained in:
2026-04-10 16:38:51 +02:00
+32 -13
View File
@@ -125,25 +125,44 @@ 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):
The patterns in `blacklist` and `whitelist` are consumed by two different
tools with different capabilities. Use only the common subset (wildcards)
to ensure patterns work everywhere.
| Form | Example | Matches |
### qBittorrent (via Blocklist Sync)
qBittorrent's excluded file names field uses Qt glob wildcards:
| Pattern | 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 |
| `*` | `*.srt` | Zero or more characters |
| `?` | `*.r??` | Exactly one character |
| `[abc]` | `*.[rs]00` | One character from the set |
| `[a-z]` | `*.[r-z]??` | One character in the range |
| `[!abc]` | `*.[!m]??` | One character NOT in the set |
| Literal | `VOSTFR` | Exact match |
Regex, backslashes, and anchors (`^`, `$`, `\d`, `(?i)`) are **not
supported** by qBittorrent and will be silently ignored.
### Cleanuparr Malware Blocker (Sonarr/Radarr queue)
Cleanuparr's Malware Blocker supports all the wildcard forms above plus
regex with the `regex:` prefix:
```
regex:.*\.srt$
```
Regex patterns only work in Cleanuparr's Malware Blocker. They do not
work when pushed to qBittorrent via Blocklist Sync.
### Merge script
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
blacklist line. See
[Lists](https://git.hisp.no/arr/blocklists/wiki/Lists) for the full rules.
## Sync schedule