Searching for anything that starts with anyletters + s
-
- Posts: 18
- Joined: Thu Mar 24, 2016 9:53 am
Searching for anything that starts with anyletters + s
I'm trying to do a query, that will search for any file that begins with any 1 or 2 characters and then the letter.
For instance:
1s
11s
3s
4s
19s
So I have this query:
1s*
What should I swap the 1 with?
Thanks!
For instance:
1s
11s
3s
4s
19s
So I have this query:
1s*
What should I swap the 1 with?
Thanks!
Re: Searching for anything that starts with anyletters + s
Search for files that begin with 1 or 2 digits followed by s:
regex:^\d{1,2}s
regex: = enable regular expressions
^ = match start of filename.
\d = match a digit.
{1,2} = match the previous term 1 to 2 times. In this case 1-2 digits.
s = match a single literal s.
Search for files that begin with 1 or 2 characters (any characters) followed by s:
regex:^.{1,2}s
Using wildcards to search for 1 character (any characters) followed by s:
?s*
Using wildcards to search for 2 characters (any characters) followed by s:
??s*
Combining the two:
?s* | ??s*
regex:^\d{1,2}s
regex: = enable regular expressions
^ = match start of filename.
\d = match a digit.
{1,2} = match the previous term 1 to 2 times. In this case 1-2 digits.
s = match a single literal s.
Search for files that begin with 1 or 2 characters (any characters) followed by s:
regex:^.{1,2}s
Using wildcards to search for 1 character (any characters) followed by s:
?s*
Using wildcards to search for 2 characters (any characters) followed by s:
??s*
Combining the two:
?s* | ??s*
-
- Posts: 18
- Joined: Thu Mar 24, 2016 9:53 am
Re: Searching for anything that starts with anyletters + s
Thanks, that was quick.
What if I also want it to end with
.wav
What if I also want it to end with
.wav
Re: Searching for anything that starts with anyletters + s
regex:^\d{1,2}s.*\.wav$
regex: = enable regular expressions
^ = match start of filename.
\d = match a digit.
{1,2} = match the previous term 1 to 2 times. In this case 1-2 digits.
s = match a single literal s.
. = match any character
* = match the previous term zero or more times, in this case match any character zero or more times.
\. = match a single literal .
wav = match the string wav
$ = match the end of the filename.
or, with wildcards, where ? can match any character:
?s*.wav | ??s*.wav
regex: = enable regular expressions
^ = match start of filename.
\d = match a digit.
{1,2} = match the previous term 1 to 2 times. In this case 1-2 digits.
s = match a single literal s.
. = match any character
* = match the previous term zero or more times, in this case match any character zero or more times.
\. = match a single literal .
wav = match the string wav
$ = match the end of the filename.
or, with wildcards, where ? can match any character:
?s*.wav | ??s*.wav
-
- Posts: 18
- Joined: Thu Mar 24, 2016 9:53 am
Re: Searching for anything that starts with anyletters + s
that works
i tried to change it to:
regex:^\d{1,3}s.*\.wav$
but its not querying items with 3 digits
i tried to change it to:
regex:^\d{1,3}s.*\.wav$
but its not querying items with 3 digits
Re: Searching for anything that starts with anyletters + s
Are you sure you have a filename with 3 digits with a s and the .wav extension?
Can you give an example filename that does not match?
Can you give an example filename that does not match?
-
- Posts: 18
- Joined: Thu Mar 24, 2016 9:53 am
Re: Searching for anything that starts with anyletters + s
my bad, it is querying it
Last edited by filipeteles on Thu Sep 14, 2017 8:39 am, edited 1 time in total.
Re: Searching for anything that starts with anyletters + s
Please make sure Match Path and Match Case are both unchecked from the Search menu.
-
- Posts: 18
- Joined: Thu Mar 24, 2016 9:53 am
Re: Searching for anything that starts with anyletters + s
ok a more complex one
what if i want to find files that before the 1-3 digits + s have the following:
10A -
1A -
2B -
12B -
For instance:
10A - 102s
1B - 1s
12B - 15s
with up to 3 digits before the A or B and up to three digits before the s
is it:
regex:^\d{1,3}A|B" - "d{1,3}s.*\.wav$
what if i want to find files that before the 1-3 digits + s have the following:
10A -
1A -
2B -
12B -
For instance:
10A - 102s
1B - 1s
12B - 15s
with up to 3 digits before the A or B and up to three digits before the s
is it:
regex:^\d{1,3}A|B" - "d{1,3}s.*\.wav$
Re: Searching for anything that starts with anyletters + s
regex:^\d{1,3}[ab]" - "\d{1,3}s.*\.wav$
[ab] = Match A or B
[ab] = Match A or B
-
- Posts: 18
- Joined: Thu Mar 24, 2016 9:53 am
Re: Searching for anything that starts with anyletters + s
genius!!!! thanks again mate!