Email Validation

Email Validation

Given a email as input, you should write a regular expression that determines if the email id is a valid email id or not. You may assume all characters are from the English language.

Example 1:

input data:

Example 2:

input data:
View Test Cases ---- true
a"b(c)d,e:f;gi[j\k] ---- false
hfij#kjdfvkl ---- false
this is"not\ ---- false ---- true ---- false ---- true ---- false ---- true ---- true ---- false ---- true
this\ still\"not\\ ---- false
just"not" ---- false ---- true ---- true
asterisk_domain@foo.* ---- false
this is not true ---- false ---- true
"" ---- true

View Java Solution

Seda Kunda is a web designer and developer with a degree in Computer Science and a great passion for code. Besides code, she enjoys pepperoni pizza, watching the bachelor and sleeping in on Saturdays.
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn