Page 1 of 1

Extension with value ranges?

Posted: Sun Apr 14, 2024 1:02 pm
by Helix751
Hi. I'm trying to make a filter for multi-part compressed files. Like rar;r00;r01;....;r99 but have tried ranges in ext: function with no success, like:

ext:rar;r<00..99>
ext:r<ar|00..99>

The following actually works, though, so I believe the range not expanding is the one to blame:

ext:r<ar|00|01|02>

Is there a way to parameterize this in v1.5 without explicitly having to declare all extensions in the range?
A simple search term or maybe RegEx, although I'm no such an expert there.

Re: Extension with value ranges?

Posted: Sun Apr 14, 2024 3:27 pm
by NotNull
Everything 1.5 has an extension: function that supports wildcards.

With that, your search could look like

Code: Select all

regex:extension:^r(ar|\d+)$
^ = start of text (extension in this case)
\d = number 0..9
+ = one or more
$ = end of text

The ^and $ are probably not needed, but prevents matching extensions like xrar, rarx and r0x


extension:

Re: Extension with value ranges?

Posted: Fri Apr 19, 2024 3:20 pm
by Helix751
Thanks!

Changed it a bit to:

Code: Select all

regex:extension:^r(ar|\d{2})$
to limit the rxx ext to exactly 2 digits.