...or use your e-mail

Go back to Challenges list


Email Address Validation

In this challenge you will be provided with inputs of strings that may or not be valid email addresses (Example: some_name@email.com). You will need to detect if the input are valid email address.

Our rules to a validate the email address are:
- Format: local@hostname
- No white spaces on both local and hostname parts
- Local part can have [a-z], [0-9] and [._-] characters
- Hostname part must be a valid domain or subdomain with [a-z], [0-9] and "." characters where "." cannot be followed by another "." (Ex: "gmail.com", "mail.co.uk" and "en.mail.com" are valid)
- Case insensitive

Input Format
Each input will contain a string that can be either an email address or a random chunk of text. There will be no extra text or whitespace leading or trailing the input string. The number of characters in each string will not exceed 100.

Output Format
One of the following two strings: "Valid" or "Invalid".

Sample Input
random text

Sample Output

Memory Limit

Sign Up or Login to solve this Code Challenge