Page 1 of 1

search for only items beginning with phrase

Posted: Sat Mar 23, 2024 8:55 am
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?

Re: search for only items beginning with phrase

Posted: Sat Mar 23, 2024 8:59 am
by void
Please try the following search:

metal-* !metal-*metal-*

* = match any character any number of times and enables full name matching.
! = NOT

Re: search for only items beginning with phrase

Posted: Sat Mar 23, 2024 9:23 am
by littlebutter283
worked perfectly thank you.

Re: search for only items beginning with phrase

Posted: Tue Mar 26, 2024 4:41 am
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?

Re: search for only items beginning with phrase

Posted: Tue Mar 26, 2024 4:42 am
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)

Re: search for only items beginning with phrase

Posted: Tue Mar 26, 2024 5:31 am
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 1326 times

Re: search for only items beginning with phrase

Posted: Tue Mar 26, 2024 5:35 am
by void
You most likely have match path enabled from the Search menu.

Please try the following search:

!regex:name:^[1-9]

Re: search for only items beginning with phrase

Posted: Tue Mar 26, 2024 5:43 am
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 1320 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 1320 times

Re: search for only items beginning with phrase

Posted: Tue Mar 26, 2024 5:45 am
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

Re: search for only items beginning with phrase

Posted: Tue Mar 26, 2024 5:52 am
by littlebutter283
oh I have overlooked '0', it works now as expected thank you.