Custom preset not filtering featurettes

Support for Windows users
Post Reply
numberone
Posts: 2
Joined: 25 Feb 2025, 07:39

Custom preset not filtering featurettes

Post by numberone »

I found info about using presets for filtering out paths based on a match here:
viewtopic.php?p=34979

However, this is not working for me where I have a source folder structure like:

Format: Select all

Series Name
--Featurettes
----Season 1
------video1.mkv
----Season 2
------video2.mkv
--Season 1
------s01e01.mkv
--Season 2
------s02e01.mkv
My "includes" string is:

Format: Select all

!(f =~ /behindthescenes|featurettes/)
Lots of files under the Featurettes folder and subfolders are still being matched. I was under the impression that an exclude match based on the file path would exclude any file with the word "featurettes" in any part of the path.
User avatar
rednoah
The Source
Posts: 24026
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Custom preset not filtering featurettes

Post by rednoah »

/behindthescenes|featurettes/ is a case-sensitive regex that matches featurettes but not Featurettes.


:arrow: You can do what you want like so:

Groovy: Select all

!(f =~ /(?i:behindthescenes|featurettes)/)

:arrow: String.match() forces the (?i) flag by default:

Groovy: Select all

none{ f.path.match(/behindthescenes|featurettes/ }
:idea: Please read the FAQ and How to Request Help.
numberone
Posts: 2
Joined: 25 Feb 2025, 07:39

Re: Custom preset not filtering featurettes

Post by numberone »

Ah, thanks. I got confused because my episode format expression appears to be case insensitive without any flag. I'm guessing this is because I must be using String.match variants there.
Post Reply