python中re模块练习:
# coding:utf-8标签:千里目,手机号,python,pattern,12456123,coding,re,马赛克 From: https://blog.51cto.com/u_14012524/5949992
import re
content = """
白日依1999988****山尽,黄河入454654213213213海流。
欲穷12456123千里目,更上156475***41一层楼。
"""
pattern = r"(1[3-9])\d{9}"
print(re.sub(pattern, r"1####", content))