我想从 1000 个 word 文档文件中提取电子邮件 ID 并在 python 中生成一个 csv 文件。
If your problem is detecting Email Address ,this Regex
code will help you:
[\w\.-]+@[\w\.-]
and you should use it in python like this:
import re
out= re.findall(r'[\w\.-]+@[\w\.-]+', YourTextFile)
print(str(out))
and the other part for reading csv or writing in it you can use this link .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.