Regex

Discussion related to "Everything" 1.5.
Post Reply
jackao
Posts: 11
Joined: Mon Dec 30, 2024 11:31 pm

Regex

Post by jackao »

regex:Tools\\([^\\]+\\){0,1}[^\\]+\.(exe|msi|ps1|bat)$

C:\Tools\Nicotine+\Nicotine+.exe

1.Why that regex syntax wouldn't match the file below? I have tried different regex flavour like PCRE2 ECMAScript Python and they all can match.

2. Everything regex stick to any flavour or build its own?
void
Developer
Posts: 19870
Joined: Fri Oct 16, 2009 11:31 pm

Re: Regex

Post by void »

What version of Everything?

Everything 1.4:
|
will break regex:
| = OR

regex:Tools\\([^\\]+\\){0,1}[^\\]+\.(exe|msi|ps1|bat)$


=>

regex:Tools\\([^\\]+\\){0,1}[^\\]+\.(exe
OR
msi
OR
ps1
OR
bat)$




Everything 1.5: regex: will eat |



For Everything 1.4, please try:

regex:"Tools\\([^\\]+\\){0,1}[^\\]+\.(exe|msi|ps1|bat)$"


" " = Escape Everything operators (|)



Everything uses PCRE
jackao
Posts: 11
Joined: Mon Dec 30, 2024 11:31 pm

Re: Regex

Post by jackao »

thanks for the support.

version: 1.5.0.1383a

"Everything 1.5: regex: will eat |"
you mean | in regex will act normally in 1.5?

Everything follow PCRE strictly or there are exceptions. If yes, where do I found the syntax

Try this but not work
regex:"Tools\\([^\\]+\\){0,1}[^\\]+\.(exe|msi|ps1|bat)$"
void
Developer
Posts: 19870
Joined: Fri Oct 16, 2009 11:31 pm

Re: Regex

Post by void »

you mean | in regex will act normally in 1.5?
Yes, no need to escape | in Everything 1.5.


Everything follow PCRE strictly or there are exceptions. If yes, where do I found the syntax
Everything uses PCRE 8.38 with no changes.

pcrepattern man page

Try this but not work
regex:"Tools\\([^\\]+\\){0,1}[^\\]+\.(exe|msi|ps1|bat)$"
This matches the following for me:
C:\Tools\Nicotine+\Nicotine+.exe

Please make sure there is nothing checked under the Search menu.
Uncheck Regex, Match Whole Words, Match Case, Match Path etc..
jackao
Posts: 11
Joined: Mon Dec 30, 2024 11:31 pm

Re: Regex

Post by jackao »

It is actually because I disable the usn journal so it didn't detect the new changes(the new downloaded file)

If I disable that on 15/9, it will not detect any changes to file and folder afterward?
or it will detect the changes maybe after a couple of days, just not the most updated changes?
void
Developer
Posts: 19870
Joined: Fri Oct 16, 2009 11:31 pm

Re: Regex

Post by void »

If I disable that on 15/9, it will not detect any changes to file and folder afterward?
Correct.
Everything will stop tracking changes as soon as the USN Journal is deleted.
Post Reply