python中re模块练习: # coding:utf-8 import re content = """ 白日依1999988****山尽,黄河入454654213213213海流。 欲穷12456123千里目,更上156475***41一层楼。 """ pattern = r"(1[3-9])\d{9}" print ( re . sub ( patte
python中re模块练习:
# coding:utf-8import recontent = """ 白日依1999988****山尽,黄河入454654213213213海流。 欲穷12456123千里目,更上156475***41一层楼。"""pattern = r"(1[3-9])\d{9}"print(re.sub(pattern, r"1####", content))