regex lookbehind search seems not fully functional

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
bjornborg
Posts: 2
Joined: Mon Mar 02, 2020 9:05 am

regex lookbehind search seems not fully functional

Post by bjornborg »

Everything version: 1.4.1.935 (x64)
I created a file "aaaxxxbbbxxx", and search the file using regex:"(?<=b{3})xxx", it works fine, I can see "aaaxxxbbbxxx" file in result.
But if I use regex "(?<=b*)xxx", there's no result.
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: regex lookbehind search seems not fully functional

Post by ovg »

AFAIK this regex flavor doesn't support variable length in lookbehind
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: regex lookbehind search seems not fully functional

Post by void »

Everything uses PCRE.

Each top-level branch of a lookbehind must be of a fixed length.

https://www.pcre.org/current/doc/html/pcre2syntax.html#SEC19
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: regex lookbehind search seems not fully functional

Post by NotNull »

bjornborg wrote: Mon Mar 02, 2020 9:56 am regex "(?<=b*)xxx"
I don't understand this regex. How is this functionally different from "(?<=b)xxx" ? (without the *).
Where could this be useful?
bjornborg
Posts: 2
Joined: Mon Mar 02, 2020 9:05 am

Re: regex lookbehind search seems not fully functional

Post by bjornborg »

void wrote: Mon Mar 02, 2020 10:51 am Everything uses PCRE.

Each top-level branch of a lookbehind must be of a fixed length.

https://www.pcre.org/current/doc/html/pcre2syntax.html#SEC19
OK, I see, thanks a lot.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: regex lookbehind search seems not fully functional

Post by NotNull »

NotNull wrote: Mon Mar 02, 2020 10:38 pm I don't understand this regex.
I'm a bit slow ... This regex is useful for more complex situations like "(?<=b*c*d*)xxx"
Post Reply