Unique email formats

In this exercise it is mentioned that there are 12 different unique formats for ‘email’ that we need to account for.

[‘email’, ‘Email’, ‘e Mail’, ‘e mail’, ‘E-mail’,
‘e-mail’, ‘eMail’, ‘E-Mail’, ‘EMAIL’, ‘emails’, ‘Emails’,

What I expected to happen:

I used ““unique = titles.str.extract(r’(\be[-\s]?mails?\b)’,flags=re.I).value_counts()”” in order to check the value counts expecting to see the provided list of 12 different email formats.

What actually happened:

What I got was only 7:
[‘email’, ‘Email’, ‘emails’, ‘Emails’, ‘e-mail’, ‘E-mails’, ‘E-Mail’]

I am just wondering what I am missing and why this answer is correct if it only matched 7 of the 12 provided ‘email’ formats. Thank you for any clarity you can provide.

1 Like


Kindly take a look at this guide for asking question.

Everything worked fine when I tried.


1 Like