fix remarks
fix compatibility with Python 2.4/2.6 (no named arguments flags for re.sub)