Hi, I am rather confused by these results below. 
I am not a re expert at all. the module version 
of re is 2.2.1 with python 3.1.2

>>> import re
>>> re.findall('.a.', 'Mary has a lamb') #OK
['Mar', 'has', ' a ', 'lam'] 
>>> re.findall('(.a.)*', 'Mary has a lamb') #??
['Mar', '', '', 'lam', '', '']
>>> re.findall('(.a.)+', 'Mary has a lamb') #??
['Mar', 'lam']


Thanks in advance for any comments.

Yingjie


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

Reply via email to