How do I limit Regex searches to a particular drive (or folder)?
For example, I can use ^[xyz] to search for files that begin with either X, Y or Z - but it displays files on *all* my drives.
How do I limit the results to C: (or C:\Users\)?
Using C:\ ^[xyz] returns *no* matches.
Thanks,
Gerry
How to limit Regex to a particular drive?
Re: How to limit Regex to a particular drive?
Please enable Match Path from the Search Menu.
Please try the following search:
^ = Match the start of the file name.
C:\\Users = Match the path C:\Users (use \\ to escape a single \).
.* = match any number of any character.
\\[xyz] = match a file name starting with xyz.
[^\\]* = match any character except a \.
$ = match the end of the file name.
Please note this will be slow.
You can do the same search instantly with the latest alpha release, regex disabled and with the following search:
C:\Windows = match files in c:\windows
*\x*\* !*\y*\* !*\z*\* = do not match sub folder and files of folder matches.
<\x | \y | \z> = File name starts with x, y or z.
I have not tested this with 1.2.1.371, it might work if you exclude the <> brackets.
Please try the following search:
Code: Select all
^C:\\Users.*\\[xyz][^\\]*
C:\\Users = Match the path C:\Users (use \\ to escape a single \).
.* = match any number of any character.
\\[xyz] = match a file name starting with xyz.
[^\\]* = match any character except a \.
$ = match the end of the file name.
Please note this will be slow.
You can do the same search instantly with the latest alpha release, regex disabled and with the following search:
Code: Select all
C:\Windows\\ !*\x*\* !*\y*\* !*\z*\* <\x | \y | \z>
*\x*\* !*\y*\* !*\z*\* = do not match sub folder and files of folder matches.
<\x | \y | \z> = File name starts with x, y or z.
I have not tested this with 1.2.1.371, it might work if you exclude the <> brackets.
Re: How to limit Regex to a particular drive?
Code: Select all
^C:\\Users.*\\[xyz][^\\]*
I am not sure if the following is possible, but I would like to request the ability
to be able to mix normal search strings and regular expressions.
For example, I would like to be able to do something like this:
Code: Select all
c:\Users\ re:^[xyz]*
of each of the path elements and not only the very beginning of the path (which would always be C:\).
Anyway, thanks for a great program.
Gerry.
Re: How to limit Regex to a particular drive?
You will be able to mix and match regex and non-regex expressions in the next release of "Everything".
You can test this now with the latest alpha release.
The following search should work with the alpha release, with regex and match path disabled:
c:\Users\ regex:^[xyz]*
You can test this now with the latest alpha release.
The following search should work with the alpha release, with regex and match path disabled:
c:\Users\ regex:^[xyz]*