Search for [a-z] (regex) ignoring letters in the file extension

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
omotrl
Posts: 15
Joined: Sun Oct 02, 2022 4:24 pm

Search for [a-z] (regex) ignoring letters in the file extension

Post by omotrl »

I need to avoid results like 123.txt, because the file name does not contain any letters.
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: Search for [a-z] (regex) ignoring letters in the file extension

Post by therube »

It looks like this will work - BUT - for files that DO NOT have an extension,
regex:[a-z]\.
.
CPCNTRL, would not be found, letters only, but no extension.

So, this might be it,
regex:[a-z].*\.
.
But that's still not right. There is a difference from above, but still not finding files with no extension?


A-z makes it "case insensitive" (but might pick up things between Z and A) - check an ascii chart?


(If someone is fast, I'll see the answer before I go ;-).)
omotrl
Posts: 15
Joined: Sun Oct 02, 2022 4:24 pm

Re: Search for [a-z] (regex) ignoring letters in the file extension

Post by omotrl »

So it looks like Everything does not have a special function or setting to exclude file extensions from search?
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Search for [a-z] (regex) ignoring letters in the file extension

Post by NotNull »

Did you try any of the suggestions? And where gave it unexpected results? What were these results?
omotrl
Posts: 15
Joined: Sun Oct 02, 2022 4:24 pm

Re: Search for [a-z] (regex) ignoring letters in the file extension

Post by omotrl »

I did try.

Code: Select all

regex:[a-z].*\.
works well, but this dot business still complicates things. In ABC123.txt it will highlight ABC123, while I need it to highlight just ABC.
My ultimate goal is to find files that contain both letters and digits in the file name (especially cases where they are in the same word).
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search for [a-z] (regex) ignoring letters in the file extension

Post by void »

contain both letters and digits in the file name (especially cases where they are in the same word)
Please try the following search:

regex:\b([a-z]+[0-9]+|[0-9]+[a-z]+)[a-z0-9]*\b.*\.[^.]*$

regex: = enable regular expressions.
\b = match a word boundary.
( ) = grouping.
[a-z]+ = match a-z one or more times.
[0-9]+ = match 0-9 one or more times.
| = OR
[a-z0-9]* = match 0-9 or a-z zero or more times.
.* = match any character any number of times.
\. = match a single literal .
[^.]* = match the extension (no dot)
$ = match the end of the filename.



What version of Everything are you using?

To show the matching word in a new column, please try the following Everything 1.5 search:

regex:\b(([a-z]+[0-9]+|[0-9]+[a-z]+)[a-z0-9]*)\b.*\.[^.]*$ addcol:regmatch1



no-highlight:
omotrl
Posts: 15
Joined: Sun Oct 02, 2022 4:24 pm

Re: Search for [a-z] (regex) ignoring letters in the file extension

Post by omotrl »

Thanks a lot, it works great! I am using 1.5.0.1321a x64, but adding addcol:regmatch1 makes the search empty. :?:
horst.epp
Posts: 1443
Joined: Fri Apr 04, 2014 3:24 pm

Re: Search for [a-z] (regex) ignoring letters in the file extension

Post by horst.epp »

omotrl wrote: Sat May 20, 2023 6:01 pm Thanks a lot, it works great! I am using 1.5.0.1321a x64, but adding addcol:regmatch1 makes the search empty. :?:
Not shure but why not trying the actual version 1346a first ?
omotrl
Posts: 15
Joined: Sun Oct 02, 2022 4:24 pm

Re: Search for [a-z] (regex) ignoring letters in the file extension

Post by omotrl »

Right, works in 1346a.
Post Reply