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

John Machin report at bugs.python.org
Sun Jan 29 00:11:12 CET 2012


John Machin <sjmachin at lexicon.net> added the comment:

@ezio: Of course the context is "inside a character class".

I expect r'[\b]' to act like r'\b' aka r'\x08' aka backspace because (1) that is the treatment applied to all other C-like control char escapes (2) the docs say so explicitly: "Inside a character range, \b represents the backspace character, for compatibility with Python’s string literals."

----------

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


More information about the Python-bugs-list mailing list