text="山东省临沂市兰山区 市委大院中区21号楼4单元 276002 奥特曼1号 18254998111"

#匹配手机号
m=re.findall(r"1\d{10}",text)
if m:
    print(m)

#匹配电话号
pattern = re.compile(r"((\d{3}|\(\d{3}\)|\d{4}|\(\d{4}\))?(\s|-|.)?(\d{8}))")
a = re.match(pattern, text)
if a:
    print(a.group())
#正则替换
text = re.sub(r'转收|收|:|手机号|电话号|手机|电话|收件人', '', text)

#查找
match_list = re.findall(u'广告位|广告点位', text)

 

相关文章:

  • 2021-06-30
  • 2021-09-23
  • 2021-10-08
  • 2021-09-07
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2021-11-02
猜你喜欢
  • 2021-11-13
  • 2021-12-18
  • 2021-08-19
  • 2021-11-13
  • 2021-12-18
  • 2021-08-14
相关资源
相似解决方案