This bug is apparently uncommon in the field, as I was the one who
discovered it. It requires a UTF-8 pattern containing a complemented
posix class, like \W or \S, in an inverted character class, like
[^\Wfoo] in a pattern that also has a synthetic start class generated by
the regex optimizer for it .
The fix is trivial.
L<perlrecharclass/POSIX Character Classes>.)
[perl #8904]
+=item *
+
+Certain regex patterns involving a complemented posix class in an
+inverted bracketed character class, and matching something else
+optionally would improperly fail to match. An example of one that could
+fail is C</qr/_?[^\Wbar]\x{100}/>. This has been fixed.
+[perl #127537]
+
=back
=head1 Known Problems
}
/* If this can match all upper Latin1 code points, have to add them
- * as well */
- if (OP(node) == ANYOFD
+ * as well. But don't add them if inverting, as when that gets done below,
+ * it would exclude all these characters, including the ones it shouldn't
+ * that were added just above */
+ if (! (ANYOF_FLAGS(node) & ANYOF_INVERT) && OP(node) == ANYOFD
&& (ANYOF_FLAGS(node) & ANYOF_SHARED_d_MATCHES_ALL_NON_UTF8_NON_ASCII_non_d_WARN_SUPER))
{
_invlist_union(invlist, PL_UpperLatin1, &invlist);
^m?(\d)(.*)\1$ 5b5 y $1 5
^m?(\d)(.*)\1$ aba n - -
+^_?[^\W_0-9]\w\z \xAA\x{100} y $& \xAA\x{100} [perl #127537]
+
# 17F is 'Long s'; This makes sure the a's in /aa can be separate
/s/ai \x{17F} y $& \x{17F}
/s/aia \x{17F} n - -