Switching to using python 2.6 syntax for re.sub() call