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']