On Aug 8, 1:53 am, [EMAIL PROTECTED] wrote: > use re module Using re.match instead of str.startswith is overkill.
> > import re > template = '^My name is alex' The ^ is redundant. > astring = 'My name is alex, and I like pie' > if re.match(template, astring): > print 'Found it' > else: print '%s does not begin with %s' % (astring, template) > -- http://mail.python.org/mailman/listinfo/python-list