finding email id from string python

Do you want to know the information about “finding email id from string python”. If yes, you’re in the correct tutorial.

finding email id from string python

import re

my_str = "Hi my name is John and email address is john.doe@somecompany.co.uk and my friend's email is jane_doe124@gmail.com"
emails = re.findall("([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)", my_str)

for mail in an email:
print(mail)

Final Words

I hope this article helps you to know about “finding email id from string python”. If you have any questions regarding this article please let us know via the comment section. Share this post with your friends & family via social networks.

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coder Diksha. Here, I post about programming to help developers.

Share on:

Leave a Comment