On Jun 28, 12:00 am, python_enthu <[EMAIL PROTECTED]> wrote: > I am trying this.. what is wrong in this.. > > IDLE 1.2.2>>> import re > >>> a="my name is fname lname" > >>> p=re.compile('name') > >>> m=p.match (a) > >>> print p.match(a) > > None > > findall() seems to work > > >>> print p.findall(a) > > ['name', 'name', 'name']
Read the manual section on the difference between match and search. -- http://mail.python.org/mailman/listinfo/python-list