Re: [pcre-dev] [Bug 1429] New: PCRE 8.34

Page principale
Supprimer ce message
Auteur: ph10
Date:  
À: Jean-Christophe Deschamps
CC: pcre-dev
Sujet: Re: [pcre-dev] [Bug 1429] New: PCRE 8.34
On Thu, 2 Jan 2014, Jean-Christophe Deschamps wrote:

>    Maybe this is not related to the issue I just encountered, but it
>    looks close. I couldn't find a reference to a change in handling \g-n
>    in classes in the revision log.
>    Previous versions (like 3.8.12 which is the only previous one I'm sure
>    worked) allowed negative backreferences inside groups, e.g. \g-1 or
>    \g{-1} but 3.8.33 errors on it.


There has never been any support for backreferences in character
classes. Inside a character class, the sequence \g is treated as a
literal "g" character, as it is in Perl. So [\g-1] is the same as [g-1].
Previously, this silently treated the hyphen as a literal. Now it gives
an error, which seems to me to be the right thing to do.

Incidentally, I don't understand your references to versions such as
3.8.33. Recent PCRE versions have been 8.32, 8.33, and 8.34. The new
error was introduced in 8.34.

Philip

--
Philip Hazel