We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Since the problem doesn't give any clue about valid email-address, for future coders, its far simpler than most of us would assume. The rules are :
1. It should be of format : <local-part>@<domain-part>
2. Local-part can contain Alphanumeric-character or .(dot)
3. Domain-part can contain Alphanumeric-character or .(dot)
Detect the Email Addresses
You are viewing a single comment's thread. Return to all comments →
Since the problem doesn't give any clue about valid email-address, for future coders, its far simpler than most of us would assume. The rules are :
Examples : hacker@hackerrank.com, my.full.name@some.website.co.in
The problem doesn't require complicated regex involving special-characters.
PS : For guys solving in python, try python2 instead of python3 to avoid unnecessary trouble.