[Mailman-Developers] another traceback
John W Baxter
jwblist@olympus.net
Mon Oct 21 02:23:31 2002
At 21:49 +0200 10/20/2002, Fil wrote:
>(current CVS) This one is weird, I must admit -- what's the difference
>betwenn re.search and re.match by the way?
re.search searches the target string for a match to the regular expression.
It's what one coming from Perl (and others) is used to.
re.match succeeds only if the RE matches at the start of the target string
(or at the (optional) starting position within the string).
The difference, I think, is inherited from Python's old and deprecated
string module, with string.search and string.match behaving as above.
These are now more often seen as the search() and match() methods on
string-like objects (such as strings).
--John
--
John Baxter jwblist@olympus.net Port Ludlow, WA, USA