From 7b2707fcf780aff210ce2d22994a332dc4d37c6f Mon Sep 17 00:00:00 2001 From: "Philip.Hazel" Date: Sat, 30 Aug 2014 16:21:17 +0000 Subject: [PATCH] Make /()a/ set the "first character must be" data. --- ChangeLog | 8 ++++++-- src/pcre2_compile.c | 2 +- testdata/testinput2 | 2 ++ testdata/testoutput2 | 12 ++++++++---- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index d42583b..6b3dd8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,8 +11,8 @@ item 20 for release 8.36. The code of the library was heavily revised as part of the new API implementation. Details of each and every modification were not individually 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 -forked. +are either new functionality, or bug fixes and other noticeable changes of +behaviour that were implemented after the code had been forked. 1. The test program, now called pcre2test, was re-specified and almost 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 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: /(?:(?=.)|(?= 0) { diff --git a/testdata/testinput2 b/testdata/testinput2 index bf348c9..030cba1 100644 --- a/testdata/testinput2 +++ b/testdata/testinput2 @@ -975,6 +975,8 @@ /()a/I +/(?:(?=.)|(?