--- On Wed, 11/3/10, John Bond <li...@asd-group.com> wrote:
> Just to clarify - findall is returning: > > [ (only match in outer group, 1st match in inner group) > , (only match in outer group, 2nd match in inner group) > , (only match in outer group, 3rd match in inner group) > , (only match in outer group, 4th match in inner group) > , (only match in outer group, 5th match in inner group) > , (only match in outer group, 6th match in inner group) > ] > > Where "only match in outer group" = "6th match in inner > group" owing to the way that capturing groups with > repetition only return the last thing they matched. > ---On Wed, 11/3/10, MRAB wrote------- > Therefore the outer (first) group is always an empty string and the > inner (second) group is the same as the previous example (the last > capture or '' if no capture). OK, I've got that, and I have no problem with the capturing part. My real problem is with the number of total matches. I think it should be 4 matches in total but findall gives 6 matches, for the new regex '((.a.)*)*'. I'd love to know what you think about this. Many thanks! Yingjie -- http://mail.python.org/mailman/listinfo/python-list