Make /()a/ set the "first character must be" data.
This commit is contained in:
parent
fbb4db531a
commit
7b2707fcf7
|
@ -11,8 +11,8 @@ item 20 for release 8.36.
|
||||||
The code of the library was heavily revised as part of the new API
|
The code of the library was heavily revised as part of the new API
|
||||||
implementation. Details of each and every modification were not individually
|
implementation. Details of each and every modification were not individually
|
||||||
logged. In addition to the API changes, the following changes were made. They
|
logged. In addition to the API changes, the following changes were made. They
|
||||||
are either new functionality, or bugs that were fixed after the code had been
|
are either new functionality, or bug fixes and other noticeable changes of
|
||||||
forked.
|
behaviour that were implemented after the code had been forked.
|
||||||
|
|
||||||
1. The test program, now called pcre2test, was re-specified and almost
|
1. The test program, now called pcre2test, was re-specified and almost
|
||||||
completely re-written. Its input is not compatible with input for pcretest.
|
completely re-written. Its input is not compatible with input for pcretest.
|
||||||
|
@ -38,4 +38,8 @@ Incorrect backtracking meant that group 2 captured only the last two bytes.
|
||||||
This bug has been fixed; the new code is slower, but it is used only when the
|
This bug has been fixed; the new code is slower, but it is used only when the
|
||||||
strings matched by the repetition are not all the same length.
|
strings matched by the repetition are not all the same length.
|
||||||
|
|
||||||
|
5. A pattern such as /()a/ was not setting the "first character must be 'a'"
|
||||||
|
information. This applied to any pattern with a group that matched no
|
||||||
|
characters, for example: /(?:(?=.)|(?<!x))a/.
|
||||||
|
|
||||||
****
|
****
|
||||||
|
|
|
@ -6217,7 +6217,7 @@ for (;; ptr++)
|
||||||
no firstcu, set "none" for the whole branch. In both cases, a zero
|
no firstcu, set "none" for the whole branch. In both cases, a zero
|
||||||
repeat forces firstcu to "none". */
|
repeat forces firstcu to "none". */
|
||||||
|
|
||||||
if (firstcuflags == REQ_UNSET)
|
if (firstcuflags == REQ_UNSET && subfirstcuflags != REQ_UNSET)
|
||||||
{
|
{
|
||||||
if (subfirstcuflags >= 0)
|
if (subfirstcuflags >= 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -975,6 +975,8 @@
|
||||||
|
|
||||||
/()a/I
|
/()a/I
|
||||||
|
|
||||||
|
/(?:(?=.)|(?<!x))a/I
|
||||||
|
|
||||||
/(?(1)ab|ac)(.)/I
|
/(?(1)ab|ac)(.)/I
|
||||||
|
|
||||||
/(?(1)abz|acz)(.)/I
|
/(?(1)abz|acz)(.)/I
|
||||||
|
|
|
@ -3327,8 +3327,13 @@ Subject length lower bound = 2
|
||||||
|
|
||||||
/()a/I
|
/()a/I
|
||||||
Capturing subpattern count = 1
|
Capturing subpattern count = 1
|
||||||
Starting code units: a
|
First code unit = 'a'
|
||||||
Last code unit = 'a'
|
Subject length lower bound = 1
|
||||||
|
|
||||||
|
/(?:(?=.)|(?<!x))a/I
|
||||||
|
Capturing subpattern count = 0
|
||||||
|
Max lookbehind = 1
|
||||||
|
First code unit = 'a'
|
||||||
Subject length lower bound = 1
|
Subject length lower bound = 1
|
||||||
|
|
||||||
/(?(1)ab|ac)(.)/I
|
/(?(1)ab|ac)(.)/I
|
||||||
|
@ -10000,8 +10005,7 @@ Subject length lower bound = 1
|
||||||
|
|
||||||
/()i(?(1)a)/I
|
/()i(?(1)a)/I
|
||||||
Capturing subpattern count = 1
|
Capturing subpattern count = 1
|
||||||
Starting code units: i
|
First code unit = 'i'
|
||||||
Last code unit = 'i'
|
|
||||||
Subject length lower bound = 1
|
Subject length lower bound = 1
|
||||||
ia
|
ia
|
||||||
0: ia
|
0: ia
|
||||||
|
|
Loading…
Reference in New Issue