search for only items beginning with phrase

General discussion related to "Everything".
Post Reply
littlebutter283
Posts: 10
Joined: Sat Mar 23, 2024 8:52 am

search for only items beginning with phrase

Post by littlebutter283 »

Hi, I would like to search for only file names that begins with 'metal-', but not anything that contains 'metal-', how should i do that?
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: search for only items beginning with phrase

Post by void »

Please try the following search:

metal-* !metal-*metal-*

* = match any character any number of times and enables full name matching.
! = NOT
littlebutter283
Posts: 10
Joined: Sat Mar 23, 2024 8:52 am

Re: search for only items beginning with phrase

Post by littlebutter283 »

worked perfectly thank you.
littlebutter283
Posts: 10
Joined: Sat Mar 23, 2024 8:52 am

Re: search for only items beginning with phrase

Post by littlebutter283 »

hi I would like to follow up by asking if there is any way to filter out results that begins with numbers (i.e. 1-9) in a search?
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: search for only items beginning with phrase

Post by void »

!regex:^[1-9]

! = NOT
regex: = enable regular expressions
^ = match start of filename
[1-9] = match a single character from a set (1-9)
littlebutter283
Posts: 10
Joined: Sat Mar 23, 2024 8:52 am

Re: search for only items beginning with phrase

Post by littlebutter283 »

for some reason it is still showing in the results, am I doing something wrong?
2024-03-26 13_30_03-g_ !regex_^[1-9] - Everything (1.5a) 1.5.0.1366a (x64).jpg
2024-03-26 13_30_03-g_ !regex_^[1-9] - Everything (1.5a) 1.5.0.1366a (x64).jpg (168.26 KiB) Viewed 2400 times
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: search for only items beginning with phrase

Post by void »

You most likely have match path enabled from the Search menu.

Please try the following search:

!regex:name:^[1-9]
littlebutter283
Posts: 10
Joined: Sat Mar 23, 2024 8:52 am

Re: search for only items beginning with phrase

Post by littlebutter283 »

I did have match path enabled before, but even when i turn it off the results still will not filter out the intended files
2024-03-26 13_41_08-g_ !regex_name_^[1-9] - Everything (1.5a) 1.5.0.1366a (x64).jpg
2024-03-26 13_41_08-g_ !regex_name_^[1-9] - Everything (1.5a) 1.5.0.1366a (x64).jpg (189.41 KiB) Viewed 2394 times
2024-03-26 13_39_26-g_ !regex_^[1-9] - Everything (1.5a) 1.5.0.1366a (x64).jpg
2024-03-26 13_39_26-g_ !regex_^[1-9] - Everything (1.5a) 1.5.0.1366a (x64).jpg (138.45 KiB) Viewed 2394 times
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: search for only items beginning with phrase

Post by void »

Filenames starting with 0 are still included.

To exclude 0-9:

!regex:name:^[0-9]

-or-

!regex:name:^\d

\d = a single digit
littlebutter283
Posts: 10
Joined: Sat Mar 23, 2024 8:52 am

Re: search for only items beginning with phrase

Post by littlebutter283 »

oh I have overlooked '0', it works now as expected thank you.
Post Reply