I could be wrong, but I think Python 2.6 doesn't support flags for re.sub at all, so you would have to use `re.compile` http://docs.python.org/2/library/re.html