Implement a simplified email validator. Return true if the string is a valid email address according to these rules:
@ symbol — not zero, not two or more@ must have at least one character@ must have at least one character'.'"user@.com" and "user@com." are invalid"user@a..b" is invalidThis is a simplified check — it does not cover the full RFC 5322 email spec.
s = "user@example.com"trues = "invalid"falses = "@example.com"false0 <= s.length <= 200s consists of printable ASCII characters.Run your code to see results
Use Cmd+Enter to run