[pcre-dev] [Bug 2792] \K should not be allowed in lookaround…

Pàgina inicial
Delete this message
Autor: admin
Data:  
A: pcre-dev
Assumpte: [pcre-dev] [Bug 2792] \K should not be allowed in lookarounds
https://bugs.exim.org/show_bug.cgi?id=2792

--- Comment #3 from Philip Hazel <Philip.Hazel@???> ---
Hmm. Have I missed something? I tried the pattern you quoted and didn't get an
infinite loop (this is pcre2test):

PCRE2 version 10.37 2021-05-26
/(?<=(<|>|=)\K=)/
5<Str+2&&Block>0||(7<=Dex&&8>=MHP)==2
0: =
1: <

Which is what I would expect. And trying it globally:

PCRE2 version 10.37 2021-05-26
/(?<=(<|>|=)\K=)/g
5<Str+2&&Block>0||(7<=Dex&&8>=MHP)==2
0: =
1: <
0: =
1: >
0: =
1: =

Again, as expected.

--
You are receiving this mail because:
You are on the CC list for the bug.