[pcre-dev] [Bug 2325] Backreference erroneously seen as both…

Top Pagina
Delete this message
Auteur: admin
Datum:  
Aan: pcre-dev
Onderwerp: [pcre-dev] [Bug 2325] Backreference erroneously seen as both set and unset in subroutine call
https://bugs.exim.org/show_bug.cgi?id=2325

Philip Hazel <ph10@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID


--- Comment #2 from Philip Hazel <ph10@???> ---
This is not a bug! It is a consequence of the way Perl used to handle backslash
followed by a digit, which is still the case in PCRE1. The documentation in
pcrepattern.3 says this: "Inside a character class, or if the decimal number
following \ is greater than 7 and there have not been that many capturing
subpatterns, PCRE handles \8 and \9 as the literal characters "8" and "9", and
otherwise re-reads up to three octal digits following the backslash, using them
to generate a data character."

Perl has changed from this behaviour, and so has PCRE2, whose documentation
says this: "Outside a character class, PCRE2 reads the digit and any following
digits as a decimal number. If the number is less than 10, begins with the
digit 8 or 9, or if there are at least that many previous capturing left
parentheses in the
expression, the entire sequence is taken as a backreference."

--
You are receiving this mail because:
You are on the CC list for the bug.