[docs] [issue27116] Documentation for regular expression alphanumeric matching are swapped. https://docs.python.org/2/library/re.html#regular-expression-syntax

Xiang Zhang report at bugs.python.org
Tue May 24 22:36:27 EDT 2016


Xiang Zhang added the comment:

I don't think no need to swap. The current doc is right.

>>> re.findall(r'\W+', 'abcd123_#@@@@')
['#@@@@']
>>> re.findall(r'\w+', 'abcd123_#@@@@')
['abcd123_']

It's apparent that \w match alphanumeric and \W vice versa.

----------
nosy: +xiang.zhang

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


More information about the docs mailing list