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

Philip Hazel <p...@hermes.cam.ac.uk> changed:

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

--- Comment #2 from Philip Hazel <p...@hermes.cam.ac.uk> ---
Petr is absolutely right. PCRE2 does not have a warning mode like Perl, so I
felt it best to give an error because this is likely to be a user error. If you
want to include a hyphen in a class, it's best to put it first or last (or, as
Petr says, escape it). The pcre2pattern documentation says this:

"Perl treats a hyphen as a literal if it appears before or after a POSIX class
(see below) or before or after a character type escape such as as \d or \H.
However, unless the hyphen is the last character in the class, Perl outputs a
warning in its warning mode, as this is most likely a user error. As PCRE2 has
no facility for warning, an error is given in these cases." 

In other words, it's a documented feature. I'm sorry you have been caught, but
I think it's better to err on the side of strictness.

-- 
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