RE模块

Posted yspass

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了RE模块相关的知识,希望对你有一定的参考价值。

1 user_info=phone:18612574474 qq:8068886262
2 print (re.findall(d*,user_info))
3 print (filter(None, re.findall(d*,user_info)))
4 [‘‘, ‘‘, ‘‘, ‘‘, ‘‘, ‘‘, 18612574474, ‘‘, ‘‘, ‘‘, ‘‘, 8068886262, ‘‘]
5 [18612574474, 8068886262]

 

以上是关于RE模块的主要内容,如果未能解决你的问题,请参考以下文章