Jon Clements <jon...@googlemail.com> added the comment: Seems consistent to me:
.match, .search and .finditer return a MatchObject whose .group() return the *entire matched string*. If you use .group(1) you'll get similar results to .findall() which returns a list of (possibly of tuples) of the captured groupings. This is the findall equivalent (using a non-capturing group): >>> re.findall('a(?:b)?', 'ab') ['ab'] ---------- nosy: +joncle _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8185> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com