[docs] [issue13899] re pattern r"[\A]" should work like "A" but matches nothing. Ditto B and Z.

Matthew Barnett report at bugs.python.org
Sat Feb 4 19:37:26 CET 2012


Matthew Barnett <python at mrabarnett.plus.com> added the comment:

In re, "\A" within a character set should be similar to "\C", but instead it's still interpreted as meaning the start of the string. That's definitely a bug.

If it doesn't do what it's supposed to do, then it's a bug.

regex tries to be backwards compatible with re but fix such bugs.

The only buggy behaviour which it retains in its version 0 (compatible) behaviour is not splitting on a zero-width match, and that's only because GvR believes that some existing code which uses re may rely on that behaviour. In its version 1 (extended) behaviour it does split on a zero-width match.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13899>
_______________________________________


More information about the docs mailing list