I have a very large .txt file with hundreds of thousands of email addresses scattered throughout. They all take the format:
...... >
import re txt = 'hello from absc@gmail.com to par1@yahoo.com about the meeting @2PM' email =re.findall('\S+@\S+',s) print(email)
Printed output:
['absc@gmail.com', 'par1@yahoo.com']