re.match
Ken Seehof
kens at sightreader.com
Tue Mar 20 13:53:16 EST 2001
re.match tests whether or not a string -matches- a regular expression.
re.search -searches- a string for the first occurrence of a regular
expression.
"Is this a dead parrot?" vs "Does anyone know where my parrot is?"
----- Original Message -----
From: "Fredrik Lundh" <fredrik at pythonware.com>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Tuesday, March 20, 2001 9:29 AM
Subject: Re: re.match
> Michael P. Soulier wrote:
> > Hey people. Could someone explain the purpose of the match function
in the
> > re module? If it's only difference from search is to match at the
beginning of
> > the line, why does it exist? That's what the ^ in the regexp is for.
>
> no, it's not. read the documentation again.
>
> Cheers /F
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list