正则表达式匹配手机4位尾号
import re ret = re.findall(r'((?<=\d)\d{4})+\b','12345678901 38473456 2305578 349579174 1786986745 18360869123') print(ret)
['8901', '3456', '5578', '9174', '6745', '9123'] #running result
本文来自博客园,作者:pie_thn,转载请注明原文链接:https://www.cnblogs.com/pie-o/p/9406945.html