0

Hi I'm trying to find a list of e-mails from a website. there is 4 e-mail addresses on the website but only returns 2 emails.

I'm using this to help search for the emails.

emails = re.findall(r'[^\s@<>]+@[^\s@<>]+\.[^\s@<>]+',s)
        print(count, ' email address found : ',item)
        count += 1
First Last
  • 29
  • 3

2 Answers2

0

You can try out this regex :

regex = r"([\w\.-]+)@([\w\.-]+)(\.[\w\.]+)"
0

The following pattern should match most forms of email addresses:

emails = re.findall(r'^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@(([0-9a-zA-Z])+([-\w]*[0-9a-zA-Z])*\.)+[a-zA-Z]{2,9})$',s)
Tim
  • 2,756
  • 1
  • 15
  • 31