Detect the Email Addresses

  • + 9 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 :

    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)
    

    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.