drop flags from re.sub for python2.6 support