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 [EMAIL PROTECTED] Port Ludlow, WA, USA _______________________________________________ Mailman-Developers mailing list [EMAIL PROTECTED] http://mail.python.org/mailman-21/listinfo/mailman-developers