How can I search for files with "numbers" only as name?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
LuckyDucky
Posts: 2
Joined: Fri Jan 28, 2022 12:28 am

How can I search for files with "numbers" only as name?

Post by LuckyDucky » Fri Jan 28, 2022 12:36 am

example:

8125138.mp4
720p_428519.avi
16-04-07.jpg


I want to search for videos/images that ONLY have numbers. Or rather, not contain any letters, since symbols such as "_", "-", or "." might be in-between, or at the end for the extension.

can I do that with everything?

void
Developer
Posts: 9622
Joined: Fri Oct 16, 2009 11:31 pm

Re: How can I search for files with "numbers" only as name?

Post by void » Fri Jan 28, 2022 1:13 am

Please try the following search:

regex:\d+.*\.[^.]*$ !regex:[a-z].*\.[^.]*$

regex:\d+.*\.[^.]*$ = match at least one digit (ignoring extension)
\d = match a digit (0-9)
.* = match any character any number of times.
\. = match a literal .
[^.]* = match any character (except .) any number of times
$ = match the end of the filename.
!regex:[a-z].*\.[^.]$ = don't match any filenames with a character between a-z (ignoring extension)



If you would like to match a single letter (for example the p in 720p), try the following to match at least two letters:
regex:\d+.*\.[^.]*$ !regex:[a-z][a-z].*\.[^.]*$

raccoon
Posts: 719
Joined: Thu Oct 18, 2018 1:24 am

Re: How can I search for files with "numbers" only as name?

Post by raccoon » Fri Jan 28, 2022 5:19 am

Yeah, I got pretty much the same solution.

no resolution "p" permitted
<pic:|video:> regex:\\[^a-z]+\.[^.]+$

with resolution "p" permitted
<pic:|video:> regex:\\(?:[^a-z]|\d\d\dp)+\.[^.]+$

LuckyDucky
Posts: 2
Joined: Fri Jan 28, 2022 12:28 am

Re: How can I search for files with "numbers" only as name?

Post by LuckyDucky » Thu Feb 03, 2022 1:26 am

void wrote:
Fri Jan 28, 2022 1:13 am
Please try the following search:

regex:\d+.*\.[^.]*$ !regex:[a-z].*\.[^.]*$

regex:\d+.*\.[^.]*$ = match at least one digit (ignoring extension)
\d = match a digit (0-9)
.* = match any character any number of times.
\. = match a literal .
[^.]* = match any character (except .) any number of times
$ = match the end of the filename.
!regex:[a-z].*\.[^.]$ = don't match any filenames with a character between a-z (ignoring extension)



If you would like to match a single letter (for example the p in 720p), try the following to match at least two letters:
regex:\d+.*\.[^.]*$ !regex:[a-z][a-z].*\.[^.]*$
It works! Thank you.

Post Reply