Hi; How do I search and replace something like this: aLine = re.sub('[<]?[p]?[>]?<font size="h' + str(x) + '"[ a-zA-Z0-9"\'=:]*>[<]?[b]?[>]?', '<h' + str(x) + '>', aLine) where RE *only* looks for the possibility of "<p>" at the beginning of the string; that is, not the individual components as I have it coded above, but the entire 3-character block? TIA, Victor
-- http://mail.python.org/mailman/listinfo/python-list