正则表达式匹配手机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

 

posted @ 2018-08-02 14:26  pie_thn  阅读(1768)  评论(0编辑  收藏  举报