Seth Troisi <brain...@gmail.com> added the comment:

Given David Murray's input I think the example would be best done as 

>>> re.search(r'(\w+) \1', "can you do the can can?") # Matches the duplicate 
>>> can
<_sre.SRE_Match object at ...>


I want to stress that the documentation is not wrong but confusing, especially 
for someone unfamiliar with regression expressions.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12162>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to