[python] Python re.sub replace with matched content