PCRE2Project / pcre2

PCRE2 development is now based here.
Other
917 stars 191 forks source link

Improve error message for \N{name} in character classes #502

Closed NWilson closed 1 month ago

NWilson commented 1 month ago

The code to parse \N has some lookahead to check whether there's a following quantifier.

This lookahead should not occur inside a character class, or a substitution string, because there are no quantifiers in those contexts.

This commit does not affect whether a string is a valid pattern; it only affects the error which is reported.