I'm trying to pick the latest revision from a list of files with Void tool's "Search everything" program. Please help me to write a regex or similar. An example file list is named like below;
File1-Rev-A
File1-Rev-B
File2-Rev-A
File3-Rev-A
File3-Rev-B
File3-Rev-C
The results need to be the latest revision from each file, like below;
File1-Rev-B
File2-Rev-A
File3-Rev-C
I can't use other file attributes, as they are all the same for every file.
Regex Question
Re: Regex Question
I'm not 100% on the required constraints.
Do the filenames start with File?
Do the filenames have an extension?
Please try the following Everything search:
regex:File\d-Rev-[A-Z]
regex: = enable regular expressions.
File = match the literal string 'File'.
\d = match a single digit
-Rev- = match the literal string '-Rev-'
[A-Z] = match a single character A to Z.
You will need Everything 1.5 alpha or later.
<regex:^File(\d)-Rev-A(.*)$ !file-exists:File\1-Rev-B\2 !file-exists:File\1-Rev-C\2> | <regex:^File(\d)-Rev-B(.*)$ !file-exists:File\1-Rev-C\2> | <regex:^File(\d)-Rev-C(.*)$>
Only Rev A-C is supported with the above.
Is there a Rev higher than C?
Do the filenames start with File?
Do the filenames have an extension?
Please try the following Everything search:
regex:File\d-Rev-[A-Z]
regex: = enable regular expressions.
File = match the literal string 'File'.
\d = match a single digit
-Rev- = match the literal string '-Rev-'
[A-Z] = match a single character A to Z.
This is trickier to do..The results need to be the latest revision from each file, like below;
You will need Everything 1.5 alpha or later.
<regex:^File(\d)-Rev-A(.*)$ !file-exists:File\1-Rev-B\2 !file-exists:File\1-Rev-C\2> | <regex:^File(\d)-Rev-B(.*)$ !file-exists:File\1-Rev-C\2> | <regex:^File(\d)-Rev-C(.*)$>
Only Rev A-C is supported with the above.
Is there a Rev higher than C?
Re: Regex Question
Thank you so much for your time and very informative response Admin.
The last part of your answer was exactly what I wanted to know whether it was possible.
Now I have something to research.
Your software is amazing and I love every single bit of it.
The last part of your answer was exactly what I wanted to know whether it was possible.
Now I have something to research.
Your software is amazing and I love every single bit of it.