[pcre-dev] Unexpected result when zero-length global matchin…

Pàgina inicial
Delete this message
Autor: ND
Data:  
A: Pcre-dev
Assumpte: [pcre-dev] Unexpected result when zero-length global matching and pattern contains \G

Good day,

Here is pcre2test output:


PCRE2 version 10.31 2018-02-12
/(?<=\G.)/g,replace=-
abc
2: a-bc-


Logically expected result: a-b-c-


PCRE advances by one character between zero-length matches. But it seems
it should not in this case.