![](/img/trans.png)
[英]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.