Start
2018年10月26日 星期五
python 正則取代
import re
reg_1 = re.compile(r"
(\d)
")
print(reg_1)
str_1 = "The population of 298444215 is growing"
res = reg_1.sub(r"
\1
a", str_1)
print(res)
較新的文章
較舊的文章
首頁