Extension with value ranges?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
Helix751
Posts: 9
Joined: Sun Apr 12, 2020 4:08 pm

Extension with value ranges?

Post 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.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Extension with value ranges?

Post 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:
Last edited by void on Mon Apr 15, 2024 5:11 am, edited 2 times in total.
Reason: added ^
Helix751
Posts: 9
Joined: Sun Apr 12, 2020 4:08 pm

Re: Extension with value ranges?

Post 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.
Post Reply