[英]Python 3.6. How to iterate over multiple list in a for loop and write them to a CSV File using DictWriter()
[英]How to open multiple doc file in python and parse email ID from them and write in csv?
我想从 1000 个 word 文档文件中提取电子邮件 ID 并在 python 中生成一个 csv 文件。
如果您的问题是检测电子邮件地址,此正则Regex
代码将帮助您:
[\w\.-]+@[\w\.-]
你应该像这样在 python 中使用它:
import re
out= re.findall(r'[\w\.-]+@[\w\.-]+', YourTextFile)
print(str(out))
另一部分用于读取 csv 或写入其中,您可以使用此链接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.