brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: write Must Not Contain terms in Sonarr as /regex/i, or they match inside words

Arr-suite
~/tips/tip-sonarr-release-profile-regex

Must Not Contain: /\bdub(bed)?\b/i

Stops a Sonarr Must Not Contain term from rejecting releases that only contain it inside another word.

Release Profiles in Sonarr v4 look simple: a list of words a release must have and a list it must not have. What surprised me is how literally a plain word is matched.

You find them under Settings, Profiles, Release Profiles. The fields are Must Contain (at least one term has to be in the release title), Must Not Contain (one hit and the release is rejected), Indexer and Tags. Leave Tags empty and the profile applies to every series. Preferred words are gone in v4; the wiki points you to Custom Formats for that.

A plain term is not a word. In the Sonarr source it is a case-insensitive substring check on the release title. Put dub in Must Not Contain to keep dubbed releases out, and you also reject every episode of Dublin Murders, because “dublin” contains “dub”. To match a whole word, write the term as a regular expression between slashes, the way the wiki shows:

Settings > Profiles > Release Profiles > +
Must Not Contain: /\bdub(bed)?\b/i
Tags: (empty, so all series)

The \b marks a word boundary, and the dots in a release name count as boundaries, so Show.S01E01.DUBBED.1080p is caught and the Dublin show is left alone. The i at the end makes the match case insensitive. Sonarr accepts a few other Perl-style modifiers too (m, s, x and n), and anything else makes the regex fail.

My advice is to check the result in an interactive search after you save. Rejected releases are still listed there, with the reason, so you can see whether your term hits too much. Also keep the Indexer field empty unless you mean it: the help text warns that a profile with an indexer set only applies to releases from that indexer.

Further reading: Sonarr settings: Release Profiles, Servarr Wiki

Going deeper: Guide: link Prowlarr to Sonarr and Radarr once, and stop typing indexers into every app

More Arr-suite tips Scene S01E01-E02-E03 Minimum Seeders Add {edition-{Edition Tags}} to the Radarr movie format for director's cuts Sonarr: None, Local Release, UTC Release Date Prowlarr does not sync download clients, so add one only for searches inside Prowlarr All Arr-suite tips (56) All topics

Link