https://bugs.exim.org/show_bug.cgi?id=2446

            Bug ID: 2446
           Summary: Positive lookbehind assertions with nested assertions
                    behave differently in PCRE and PCRE2
           Product: PCRE
           Version: 10.32 (PCRE2)
          Hardware: x86-64
                OS: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
          Assignee: p...@hermes.cam.ac.uk
          Reporter: p...@etutor.pl
                CC: pcre-dev@exim.org

In PHP 7.2, which uses PCRE 8.41, the following call:

preg_split("/(?<='(?!t(?<=n't)))/ui", "n't", null, PREG_SPLIT_NO_EMPTY)

returns the following array:

[
  0 => n't
]

However in PHP 7.3, which uses PCRE 10.32, the result for the same call is
different:

[
  0 => n',
  1 => t
]

It seems that the positive lookbehind assertion is treated differently. It
looks like a bug in PCRE2, as other regular expression implementations (for
example, in Java) behave in the same way as PCRE1 for this expression.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/pcre-dev 

Reply via email to