如下的资料是关于python从任意文件读取邮件地址输出的代码。
# This script takes whatever you throw at stdin and outputs email addresses.
# eg. python email_extractor.py < PythonFAQ.html
# This script can be used for whatever you want, EXCEPT SPAMMING !
import sys,re
print ‘n‘.join(re.findall(‘([w.-][email protected][w.-]+)‘,sys.stdin.read()))
原文地址:https://www.cnblogs.com/yumiban/p/10355879.html
时间: 2024-10-08 01:14:24