采用
re.sub(pattern, replace, text, flags=re.MULTILINE)
代替
re.sub(pattern, replace, text, re.MULTILINE)
相当于
re.sub(pattern, replace, text, count=re.MULTILINE)
参见re.sub()
Python正则表达式中的错误?(带有re.MULTILINE的re.sub)
采用
re.sub(pattern, replace, text, flags=re.MULTILINE)
代替
re.sub(pattern, replace, text, re.MULTILINE)
相当于
re.sub(pattern, replace, text, count=re.MULTILINE)
参见re.sub()