matching file with certain digit of numbers or characters

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
Ismale.d
Posts: 11
Joined: Tue Nov 02, 2021 11:20 am

matching file with certain digit of numbers or characters

Post by Ismale.d »

I have tried for an hour and I can't even get this simple search work, this is extremely frustrating!

say I want to filter out file that have 5 digit of random number, what syntax should I use?

I even make a file called "12345.jpg"
1234#.jpg: no result
1234?.jpg: no result
1234*.jpg: no result
123*:no result
even with double apostrophe, no result.

Much appreciate for any help.
void
Developer
Posts: 16746
Joined: Fri Oct 16, 2009 11:31 pm

Re: matching file with certain digit of numbers or characters

Post by void »

Please try the following search:

regex:\d{5}

\d = match a digit
{5} = match the previous element 5 times.


files only:

file:regex:\d{5}

file: = match files only.



jpg files only:

file:regex:\d{5}.*\.jpg$

.* = match any character any number of times.
\. = match a literal .
jpg = match literal jpg
$ = match the end of the filename.
Ismale.d
Posts: 11
Joined: Tue Nov 02, 2021 11:20 am

Re: matching file with certain digit of numbers or characters

Post by Ismale.d »

hi, thanks for the quick reply.

but now item with other character in front of the digit are also match.
eg: abc12345.jpg


Also may I know why "?"/"#" operator doesn't work in my case? Is it a function which is not implemented or the way I use it is incorrect.
Again thanks!
void
Developer
Posts: 16746
Joined: Fri Oct 16, 2009 11:31 pm

Re: matching file with certain digit of numbers or characters

Post by void »

Please try the following search:



file:regex:^\d{5}.*\.jpg$

^ = match the start of the filename.


Also may I know why "?"/"#" operator doesn't work in my case? Is it a function which is not implemented or the way I use it is incorrect.
Again thanks!
What options do you have enabled under the Search menu?

Please make sure regex is unchecked.
You might have Match Path enabled, which will cause Everything to match the full path and filename.

Please try the following searches:

**\1234?.jpg
**\1234*.jpg
**\123*.jpg

-or-

Uncheck Match Path from the Search menu, and search for:

1234?.jpg
1234*.jpg
123*.jpg

# is not supported in Everything 1.4
# will be supported in Everything 1.5 with the wildcards: search modifier.
Ismale.d
Posts: 11
Joined: Tue Nov 02, 2021 11:20 am

Re: matching file with certain digit of numbers or characters

Post by Ismale.d »

much appricate the help!

Yes I confirm disable "regex" do the trick.
(don't know why it is enable all of the sudden.)

regex solution also work accordingly, but I can't replicate the same result with normal operators.
(ie ????.jpg can't match abcd.jpg)
void
Developer
Posts: 16746
Joined: Fri Oct 16, 2009 11:31 pm

Re: matching file with certain digit of numbers or characters

Post by void »

(ie ????.jpg can't match abcd.jpg)
Please make sure Match Path is unchecked under the Search menu.
Ismale.d
Posts: 11
Joined: Tue Nov 02, 2021 11:20 am

Re: matching file with certain digit of numbers or characters

Post by Ismale.d »

oh stupid me, sorry I have been keep turning it on and off I kind of confused.
Yes you are correct, it work properly after turning off match path!

Again thanks for this excellent tool and your help!
Post Reply