On Thu, 07 Aug 2008 23:08:10 +0200, magloca <[EMAIL PROTECTED]> wrote:
John Machin wrote:
import re
template = '^My name is alex'
The ^ is redundant.
Didn't the OP want to match only at the beginning of the string?
That's why it's "redundant" instead of "incorrect". ;)
re.match = match(pattern, string, flags=0)
Try to apply the pattern at the *start* of the string, returning
a match object, or None if no match was found.
Emphasis mine.
Jean-Paul
--
http://mail.python.org/mailman/listinfo/python-list