[pcre-dev] Max_lookbehind issues

Página Principal
Apagar esta mensagem
Autor: ND
Data:  
Para: Pcre-dev
Assunto: [pcre-dev] Max_lookbehind issues

Good day!


There are some kinds of problems that exist with max_lookbehind:
- bugs
- performance issues
- brings excessive work to user

Now I report only about potential bugs.

Here is pcre2test output:


PCRE2 version 10.34-RC1 2019-04-22
/(?<=(?=(?<=.)).)/info,allusedtext
Capture group count = 0
Max lookbehind = 1
May match empty string
Subject length lower bound = 0
ab
  0: ab
     <<


/(?<=\A.)/info,allusedtext
Capture group count = 0
Max lookbehind = 1
May match empty string
Subject length lower bound = 0
ab
  0: a
     <


/(?<=\G.)/info,allusedtext
Capture group count = 0
Max lookbehind = 1
May match empty string
Subject length lower bound = 0
ab
  0: a
     <



In all 3 cases we see that Max lookbehind = 1
but it seems it must be 2.

\A and \G may be considered as (?<!.) in dotall mode