Re: [pcre-dev] PCRE2-10.23: Issue with 'pcre2_compile'
|This message is part of the following thread:|
|the complete thread tree sorted by date|
Perl treats a hyphen as a literal if it appears before or after a POSIX class (see below) or a character type escape such as as \d, but gives 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.
If a minus character is required in a class, it must be escaped with a backslash or appear in a position where it cannot be interpreted as indicating a range, typically as the first or last character in the class, or immediately after a range.