Page 1 of 1

Regular expressions do not work (SEPARATE FOLDER NAME)

Posted: Wed Jan 02, 2019 3:25 pm
by Debugger
regex:[\p{IsCyrillic}]
regex:^[A-Za-z.!@?#"$%&:;() *\+,\/;\-=[\\\]\^_{|}<>\u0400-\u04FF]*$
regex:[\u0401\u0451\u0410-\u044f]

Re: Regular expressions do not work

Posted: Thu Jan 03, 2019 12:13 am
by void
Some suggestions:
regex:[\p{Cyrillic}]

Remember to escape spaces and | with double quotes, use a #quot: for a literal quote:
regex:"^[A-Za-z.!@?#$%&:;() *\+,\/;\-=[\\\]\^_{|}<>\x{0400}-\x{04FF}#quot:]*$"

Everything uses PCRE in non-Javascript mode, you will need to use \x{xxxx} in place of \uxxxx
regex:[\x{0401}\x{0451}\x{0410}-\x{044f}]

https://www.pcre.org/original/doc/html/pcrepattern.html

Re: Regular expressions do not work

Posted: Thu Jan 03, 2019 2:33 pm
by froggie
Everything uses PCRE in non-Javascript mode

https://www.pcre.org/original/doc/html/pcrepattern.html
Would be nice to have this information in Everything Help, maybe under "advanced Regex"

Re: Regular expressions do not work

Posted: Fri Jan 04, 2019 12:57 am
by void
Added to my TODO list, thanks for the suggestion.

I've added support for \uxxxx for the next version of Everything.

Re: Regular expressions do not work

Posted: Sat Jan 12, 2019 10:32 am
by Debugger
And what is a regular expression that partially excludes the matching of folder names? I was looking for information on the internet, but to no avail. Instead of excluding names, they find what I wanted to exclude. So it works contrary to the intended one. :(

Re: Regular expressions do not work

Posted: Sat Jan 12, 2019 11:38 am
by void
Lookahead negative assertions.

regex:"^(?!.*folder name)"

Replace folder name with the partial folder name you wish to exclude.

To limit the results to just folders, include the following in your search:
folder:

You can also use ! in Everything as the NOT operator, for example:
folder: !"folder name"
where folder name is your partial search.

If you wish to exclude paths, by just specifying the start of the path, please try searching for:
regex:"^(?!C:\\program files)"
where C:\\program files is the path you wish to exclude, this would exclude C:\program files and C:\Program files (x86)

Re: Regular expressions do not work

Posted: Sat Jan 12, 2019 7:35 pm
by Debugger
regex:"[E-Z]:\\VK\s(?!.*Listy|Penpals|Postcrossing"

How to separate the PARTIAL matches of different folder names, because it does not work

Re: Regular expressions do not work

Posted: Sat Jan 12, 2019 8:29 pm
by vanisk
Debugger wrote: Sat Jan 12, 2019 7:35 pm regex:"[E-Z]:\\VK\s(?!.*Listy|Penpals|Postcrossing"
Its missing a close parenthesis.
regex:"[E-Z]:\\VK\s(?!.*Listy|Penpals|Postcrossing)"

Re: Regular expressions do not work

Posted: Sat Jan 12, 2019 8:48 pm
by Debugger
vanisk wrote: Sat Jan 12, 2019 8:29 pm
Debugger wrote: Sat Jan 12, 2019 7:35 pm regex:"[E-Z]:\\VK\s(?!.*Listy|Penpals|Postcrossing"
Its missing a close parenthesis.
regex:"[E-Z]:\\VK\s(?!.*Listy|Penpals|Postcrossing|ALL)"

Thanks, I missed an important detail :P


Still problem partial match not work ALL => ALL!!