替换正则

可以快速上手的开发文档

#替换正则

python re.sub()替换正则的匹配内容方法

如下所示:importrec=re.compile(r'\d')s='you1are2welcome'#用指定的内容,替换正则匹配的内容,也可..