File name contains numbers between

General discussion related to "Everything".
Post Reply
siomosp
Posts: 17
Joined: Sat Feb 27, 2021 11:43 am

File name contains numbers between

Post by siomosp »

Hi,
anybody know if i can search file names containing number between 2 numbers?
This search is working fine
17823|17824|17825|17826|17827|17828|17829|17830
Can be done like this?
>= 17823 <= 17830
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: File name contains numbers between

Post by raccoon »

There is a number: function in Everything v1.5 Alpha used to perform value math on substring matches, but currently, it only works in combination with regex: pattern matches. Which looks like this:

regex:\d\d\d\d\d number:regexmatch0:17823..17830

You can refine the regex pattern to make it more strict, as you find necessary. Here's an example:
regex:S01E(\d\d) number:regexmatch1:13..26

If you normally keep Match Path turned on, it can be temporarily disabled with:
nopath:regex:\d\d\d\d\d number:regexmatch0:17823..17830

You can add the columns regular-expression-match-0 or regular-expression-match-1 to display the matching substring for column sorting. You can also sort these numbers with the sort: verb:
nopath:regex:\d\d\d\d\d number:regexmatch0:17823..17830 sort:RegularExpressionMatch0

If there are other methods of using number: or using function:start..end syntax on filename substrings, someone else please chime in. I'm curious!
siomosp
Posts: 17
Joined: Sat Feb 27, 2021 11:43 am

Re: File name contains numbers between

Post by siomosp »

nopath:regex:\d\d\d\d\d number:regexmatch0:17823..17830
works great :)
Thank you!!
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: File name contains numbers between

Post by raccoon »

Also consider refining the search term to this, instead.

nopath:regex:\d+ number:regexmatch0:17823..17830

or better yet

nopath:regex:\d\d\d\d\d+ number:regexmatch0:17823..17830

This way it will not match on the number 178294, since additional digits will be picked up to detect (and exclude) much larger numbers than you were searching for.
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: File name contains numbers between

Post by raccoon »

siomosp wrote: Fri Nov 12, 2021 6:40 pm nopath:regex:\d\d\d\d\d number:regexmatch0:17823..17830
works great :)
Thank you!!
As of Everything 1.5.0.1286a on Nov 29th, number:regexmatch0: has become tonumber:regexmatch0:

Alternately, you can now just use this simpler search term without needing any regex:

number:17823..17830

Be sure to update your bookmarks.
Last edited by void on Tue Jan 30, 2024 10:15 am, edited 1 time in total.
Reason: fixed link
siomosp
Posts: 17
Joined: Sat Feb 27, 2021 11:43 am

Re: File name contains numbers between

Post by siomosp »

Excellent, thank you!
Post Reply