19.07.13 21:08, Skip Montanaro написав(ла):
Serhiy> The string replace() method is fastest (at least in Python 3.3+). See Serhiy> implementation of html.escape() etc. I trust everybody knows by now that when you want to use regular expressions you should shell out to Perl for the best performance. :-)
If you want to use regular expressions Python is not the best choice. But if you want to use Python regular expressions sometimes are the best choice.
-- http://mail.python.org/mailman/listinfo/python-list