Testing for the first few letters of a string

magloca magloca at mailinater.com
Thu Aug 7 23:08:10 CEST 2008

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?


More information about the Python-list mailing list