[issue14237] Special sequences \A and \Z don't work in character set []
py.user
report at bugs.python.org
Sat Mar 10 01:19:07 CET 2012
py.user <port139 at yandex.ru> added the comment:
Martin v. Löwis wrote:
> What behavior would you expect?
I expected similar work
>>> re.search(r'[\s]a', ' a').group()
' a'
>>> re.search(r'[\s]a', 'ba').group()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'group'
>>>
>>>
>>> re.search(r'[^\s]a', ' a').group()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'group'
>>> re.search(r'[^\s]a', 'ba').group()
'ba'
>>>
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14237>
_______________________________________
More information about the Python-bugs-list
mailing list