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. :-) Skip