-
-
Notifications
You must be signed in to change notification settings - Fork 3
Regex
Kellerman81 edited this page Dec 21, 2025
·
3 revisions
Regex patterns allow you to filter releases by requiring or rejecting specific patterns in release names. This is configured per quality template indexer.
Regex filters are defined in regex templates and then linked to quality templates. Each indexer in a quality template can reference a regex template for custom filtering.
- name: Unique identifier for the regex template
- rejected: Array of regex patterns - releases matching ANY pattern will be rejected
- required: Array of regex patterns - releases must match ALL patterns to be accepted (if specified)
[[regex]]
name = "en_series_filter"
rejected = [
"(?i)(\\b|_)(2160p|810p|360p|pal|ntsc)(\\b|_)",
"(?i)(\\b|_)(bonus|trailer|sample)(\\b|_)",
"(?i)(\\b|_)extra(s)?(\\b|_)",
"(?i)(\\b|_)(ac3)?md(\\b|_)",
"(?i)(\\b|_)mic(dubbed)?(\\b|_)",
"(?i)(\\b|_)(cd|disc|disk|dvd|part)[ .\\-)]?(1|2|3|4|5|9|r)(\\b|_)",
"(?i)(_|-)(a|b|c|d)(\\b|_)",
"(?i)(\\b|_)(imageset|get b8|1bet|galaxxxy|asap|3d|buymore)(\\b|_)",
"(?i)(\\b|_)(fre|fr|truefr)(nch|sub|subs)?(\\b|_)",
"(?i)(\\b|_)ita(lian)?(\\b|_)",
"(?i)(\\b|_)spa(nish)?(\\b|_)",
"(?i)(\\b|_)rus(ian)?(\\b|_)",
"(?i)(\\b|_)(tur|tr)(kish)?(\\b|_)",
"(?i)(\\b|_)(dut|nl)(ch)?(\\b|_)",
"(?i)(\\b|_)kor(ean|sub|subs)?(\\b|_)",
"(?i)(\\b|_)(dan|dk|pol)(ish|sub|subs)?(\\b|_)",
"(?i)(\\b|_)swe(dish|sub|subs)?(\\b|_)",
"(?i)(\\b|_)heb(rew|sub|subs|dub)?(\\b|_)",
"(?i)(\\b|_)(castellano|tamil|hindi|nordic|br|japanese|chinese)(\\b|_)",
"(?i)(\\b|_)moto(2|3)(\\b|_)",
"(?i)(\\b|_)sub(s|bed)?(\\b|_)",
"(?i)(\\b|_)cam(rip)?(\\b|_)",
"(?i)(\\b|_)(webscr|screener|webscreener|ts|r5|hdcam|hqcam)(\\b|_)",
"(?i)(\\b|_)ger(man)?(\\b|_)",
"(?i)(\\b|_)(deu|und|wie|der|das|ein|eine)(tsch)?(\\b|_)"
]
required = [][[regex]]
name = "require_proper"
rejected = []
required = ["(?i)(\\b|_)(proper|repack)(\\b|_)"]# Reject non-English releases
[[regex]]
name = "english_only"
rejected = [
"(?i)(\\b|_)(german|french|spanish|italian|russian)(\\b|_)",
"(?i)(\\b|_)sub(s|bed)(\\b|_)"
]
required = []
# Reject low quality releases
[[regex]]
name = "no_cam"
rejected = [
"(?i)(\\b|_)(cam|ts|tc|r5|screener)(rip)?(\\b|_)",
"(?i)(\\b|_)hd(cam|ts)(\\b|_)"
]
required = []
# Require specific release groups
[[regex]]
name = "trusted_groups"
rejected = []
required = ["(?i)-(SPARKS|NTb|ROVERS|DEFLATE|FLUX)$"]Regex templates are linked to indexers within quality templates:
[[quality]]
name = "HD"
# ... other quality settings ...
[[quality.quality_indexer]]
indexer = "nzbgeek"
template_downloader = "sabnzbd"
template_path = "movies"
template_regex = "english_only" # Links to regex template by name
# ... other indexer settings ...- (?i): Case-insensitive matching
- \b: Word boundary
- _: Underscore (common in release names)
- (a|b|c): Match any of a, b, or c
- (pattern)?: Optional pattern
- [abc]: Character class - matches a, b, or c
- \.: Literal dot (escaped)
Language Filters:
(?i)(\\b|_)(german|french|spanish|italian)(\\b|_)
(?i)(\\b|_)sub(s|bed)?(\\b|_)Quality Filters:
(?i)(\\b|_)(cam|ts|screener)(rip)?(\\b|_)
(?i)(\\b|_)(360p|480p|2160p)(\\b|_)Unwanted Content:
(?i)(\\b|_)(sample|trailer|bonus)(\\b|_)
(?i)(\\b|_)extra(s)?(\\b|_)Release Group:
-GROUP_NAME(\\b|_)
-(GROUP1|GROUP2|GROUP3)$- regex101.com: Interactive regex tester with explanation
- regexr.com: Visual regex builder and tester
Check which releases are accepted/rejected:
Quality Priority Check:
GET http://server:port/api/quality/{quality_name}/{media_group}?apikey=your_key
Example:
http://localhost:9090/api/quality/HD/EN?apikey=mysecure
Search List (Movies):
GET http://server:port/api/movies/search/list/{movie_id}?apikey=your_key
Search List (Series Episodes):
GET http://server:port/api/series/episodes/search/list/{episode_id}?apikey=your_key
RSS Search List (Movies):
GET http://server:port/api/movies/rss/search/list/{media_group}?apikey=your_key
RSS Search List (Series):
GET http://server:port/api/series/rss/search/list/{media_group}?apikey=your_key
These endpoints show:
- All releases found
- Which releases were accepted/rejected
- The reason for rejection (matched pattern, quality mismatch, etc.)
- Priority scores for accepted releases
- Start Simple: Begin with basic filters and add complexity as needed
- Test Thoroughly: Use regex testing tools before deploying
-
Case Insensitive: Always use
(?i)flag for release name matching -
Word Boundaries: Use
\\bor_to avoid partial matches - Combine Filters: Use multiple regex templates for different purposes
-
Required vs Rejected:
rejectedis OR logic (match any to reject),requiredis AND logic (must match all) - Performance: Complex regex can slow down parsing; keep patterns efficient
- Common Patterns: Reuse proven patterns from the community
- Log Analysis: Check logs to see which patterns are triggering most often
- Incremental Updates: Add one pattern at a time and verify results
[[regex]]
name = "english_only"
rejected = ["(?i)(\\b|_)(german|french|spanish|italian|russian|dutch|korean|japanese|chinese)(\\b|_)"]
required = [][[regex]]
name = "no_low_quality"
rejected = [
"(?i)(\\b|_)(cam|ts|tc|r5|screener|dvdscr|hdcam)(rip)?(\\b|_)",
"(?i)(\\b|_)(360p|480p)(\\b|_)"
]
required = [][[regex]]
name = "scene_only"
required = ["(?i)-(SPARKS|NTb|ROVERS|DEFLATE|FLUX|AMRAP|SURCODE)$"]
rejected = [][[regex]]
name = "no_split_archives"
rejected = ["(?i)(\\b|_)(cd|disc|disk|dvd|part)[ .\\-)]?(1|2|3|4|5)(\\b|_)"]
required = [][[regex]]
name = "proper_only"
required = ["(?i)(\\b|_)(proper|repack)(\\b|_)"]
rejected = []