> From: John Bond <li...@asd-group.com>
> >>>> re.findall('(.a.)+', 'Mary has a lamb')
> > ['Mar', 'lam']

> It's because you're using capturing groups, and because of
> how they work - specifically they only return the LAST match
> if used with repetition (and multiple matches occur).

It seems capturing groups is assumed by default,
but this is somehow against my intuition...
Ituitively, it should be what matches the 
whole regex '(.a.)+', shouldn't it?

Regards,

Yingjie


      
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to