Hello and good day,
I have a inquiry about Everything and I'm actually quite confused.
I know there maybe a different way to do this however I'm attempting to keep my old feeble mind sharp when it comes to regex so I am attempting to exercise this knowledge some.
Here is my ponderence. I'm doing a statement that looks for both the .jpg and .jpeg extensions with regex. When I activate the regex via menu option/keyboard shortcut, the following statement works like a charm.
\.\jp(g|eg)
This returns what I expect to see.
However because I also want to just show a certain time/date range, I want to enable the regex parameter without it being global so I can use the dm: function.
However when I just put this into Everything regex:\.\jp(g|eg), it returns only one file and it is not even a picture file!
Am I using the regex: parameter incorrectly? I have done similar statements and it has worked correctly. I will admit in those other scenarios, I was not looking for an extension nor was i telling Everyting in those instances to substitute the ending with two different variants.
Thank you for your time and if someone more versed in this tool can maybe show a shortcut that I could file away for reference, I will appreciate that input as well.
Issues with Everything and regex
-
- Posts: 7
- Joined: Mon Feb 20, 2023 12:49 pm
Re: Issues with Everything and regex
Here is some screenshots to hopefully better illustrate the issue.
Re: Issues with Everything and regex
You want, .
Says to match "jp" AND "e", zero or 1 times, AND g.
You might want to add a $ to to only match at the end of the name.
You could also use,.
, say to match:
g OR | OR e OR g
not g OR "eg"
regex:\.jp(e?)g
Says to match "jp" AND "e", zero or 1 times, AND g.
You might want to add a $ to to only match at the end of the name
regex:\.jp(e?)g$
You could also use,
ext:jpg;jpeg
(g|eg)
g OR | OR e OR g
not g OR "eg"
Re: Issues with Everything and regex
regex:\.\jp(g|eg)
regex and Everything BOTH use the | as an OR operator.
In this case, Everything "wins" and will split the search in two separate ones:
The regex mode stops after that and a normal search for eg) will find your single .lng file
To tell Everything the | belongs to the regex query, enclose the regular expressions in "":
There is an extra unneeded backslash in your regular expression.
Replace with :
Do you get the expected results with this new search?
regex and Everything BOTH use the | as an OR operator.
In this case, Everything "wins" and will split the search in two separate ones:
- regex:\.\jp(g
- eg)
The regex mode stops after that and a normal search for eg) will find your single .lng file
To tell Everything the | belongs to the regex query, enclose the regular expressions in "":
regex:"\.\jp(g|eg)"
There is an extra unneeded backslash in your regular expression.
Replace
\.\jp(g|eg)
\.jp(g|eg)
Code: Select all
regex:"\.jp(g|eg)"
-
- Posts: 7
- Joined: Mon Feb 20, 2023 12:49 pm
Re: Issues with Everything and regex
Hello and good day,
I did see that Everything used the | operator as or however because I put it after the regex: option, I figured that it would be parsed through regex and not through Everything.
You are correct that I did put an extra escape character in. See what happens when older folks don’t keep using regex.
Thank you for looking into it however I was under the impression that using “” would not parse the | correctly.
I’ll give it a go when I get a moment.
Thanks again!
I did see that Everything used the | operator as or however because I put it after the regex: option, I figured that it would be parsed through regex and not through Everything.
You are correct that I did put an extra escape character in. See what happens when older folks don’t keep using regex.
Thank you for looking into it however I was under the impression that using “” would not parse the | correctly.
I’ll give it a go when I get a moment.
Thanks again!
Re: Issues with Everything and regex
Everything 1.5 - currently in development - will handle it this way (at least: it looks like it)mheartley72 wrote: ↑Mon Feb 20, 2023 11:40 pm I figured that it would be parsed through regex and not through Everything.
-
- Posts: 7
- Joined: Mon Feb 20, 2023 12:49 pm
Re: Issues with Everything and regex
Good to know! Thank you for the info!NotNull wrote: ↑Mon Feb 20, 2023 11:58 pmEverything 1.5 - currently in development - will handle it this way (at least: it looks like it)mheartley72 wrote: ↑Mon Feb 20, 2023 11:40 pm I figured that it would be parsed through regex and not through Everything.
-
- Posts: 7
- Joined: Mon Feb 20, 2023 12:49 pm
Re: Issues with Everything and regex
Good info especially the extension operator! Thanks!