Preferred Words RegEx Help

I am trying to “simplify” my Preferred scoring method by using some RegEx expressions. Here is the current setup:

+36
Atmos/TrueHS/DTS-HD
\b(TrueHD|ATMOS|DTS-HD)\b/i

+35
7.1 Surround
\b((DD.?7).*)\b/i

+34
5.1 Surround
\b((DTS|EAC3|DD[p+]?5|6CH).*)\b/i

+17
265 Encoding
\b([xh].?265|HEVC)\b/i

+2
264 Encoding
\b([xh].?264)\b/i

+41
2160

+23
1080

+4
720

I am testing (by searching for a specific episode) and it does not appear to be picking up any of the RegEx scores. Here’s an excerpt from the Trace log:

Blockquote
20-6-22 17:45:34.1|Trace|PreferredWordService|Calculated preferred word score for ‘9-1-1.Lone.Star.S01E10.720p.WEB.x264-TRUMP’: 4
.
20-6-22 17:45:34.4|Trace|PreferredWordService|Calculated preferred word score for ‘9-1-1.Lone.Star.S01E10.1080p.WEB.x264-TRUMP’: 23
.
20-6-22 17:45:34.6|Trace|PreferredWordService|Calculated preferred word score for ‘9-1-1.lone.star.s01e10.720p.web.x264-trump’: 4
.
20-6-22 17:45:34.9|Trace|PreferredWordService|Calculated preferred word score for ‘9-1-1.lone.star.s01e10.1080p.web.x264-trump’: 23

As you can see, it is only scoring the resolution and ignoring the sound profile and encoding codecs - the two items that use RegEx to evaluate. What am I missing here?

Thanks,
Shoppedude

You need to use the pattern /regex/i to actually make it regex, it looks like you’ve included /i to make it case insensitive, but without the leading slash it’s going to do a string match, not a regex match.