reverse a string using re.sub