Extract Email Addresses from a Text File with regex Python

preview_player
Показать описание
How to use regular expressions and extract all email addresses from a text file.

#subscribe

Link for the code

#python #regularexpression #extractemailfromtext
Рекомендации по теме
Комментарии
Автор

i love u, i've been trying so long, thanks for the break through

kmsmdm
Автор

Nice video. I did some tweaking because I wanted to also redirect the output to a text

import sys
sys.stdout=open("C:\\Users\\USER\Desktop\\output.txt", "w")


import re
f = open("C:\\Users\\USER\Desktop\\us1.txt", 'r', encoding = 'utf-8')
line = f.read()
match = re.findall(r'[\w\.-]+@[\w\.-]+', line)
for i in match:
print(i)

sys.stdout.close()

burky
Автор

Hi, I am trying to extract email ids from xml or text file using python version 3.8.3 in mac. Could you please help me.

anandraj
Автор

Bro start ethical hacking video bro .. awaiting

kumarselvam
Автор

Bro merko sender ka perfect person name chaye woh batana plzz

sohailshaikh