REGEX EMAIL EXTRACTOR IN PYTHON ---DAY 4

 """

# Email Collector
str ='''
2
'''
# email1
# email2
# email3
"""

##Bhai baad me update kr skta hu..
import re
str1='''

Hello bro, my name is deepak tiwari and my email id is madhurima.moulik2015@gmail.com,
And I am learning programming on code with harry youtube channel and I have one more
email:"madhurima.moulik2015@.com"
and some more
email id:<dt@codewithharry.com>

email:"madhurima.moulik2015@.com.in" and I have one more harrybhai@codewithharry.com.

'''
list1=re.findall(r'\w+@\S+\w',str1)

op=open("email_store.txt","a")

j=1
for i in list1:
op.write(f"Email{j}:{i}\n")
j=j+1
op.close()

print(f"Email's are:{list1}")
print(f"Total Email's are:{j-1}")



Comments

Popular posts from this blog

java chapter11 practice question on abstruct class and interfaces

DAY 12 -AZURE DP900(Microsoft Azure Data Fundamentals: Explore non-relational data in Azure)

java exercise4