escape sequences and string comparisons

Fredrik Lundh fredrik at effbot.org
Tue Jan 9 10:55:42 EST 2001


jkndeja at my-deja.com talks to himself again:
> - I still think this makes re.escape() less useful than it
> might be. How about a function which turns a string into an 'escaped'
> form such that it would be an 'exact' RE match with itself?

That's *exactly* what re.escape() does, of course.

Cheers /F





More information about the Python-list mailing list