Electronic mail, or email, is a method of exchanging digital messages between people using digital devices such as computers, mobile phones and other electronics. Email first entered substantial use in the 1960s and by the mid-1970s had taken the form now recognized as email. Email operates across computer networks, which today is primarily the Internet.
Write a function witch help you to verify if a string given is a mail address or not, true if you want to say yes it's a mail, and false if not a mail address.
Solution Stats
Problem Comments
4 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers16
Suggested Problems
-
1246 Solvers
-
Find out missing number from a vector of 9 elements
320 Solvers
-
Sum the numbers on the main diagonal
611 Solvers
-
Sum of odd numbers in a matrix
614 Solvers
-
130 Solvers
More from this Author14
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
problem in ur test case 2 & 4
The test suite has problems according to RFC 3969 (https://www.rfc-editor.org/rfc/inline-errata/rfc3696.html): there should not be spaces in a domain address, nor can it be made with numbers only. When building a problem of such type, it is best to specify which RFC that you are using as a reference, or if its rules are made up (which should be described).
Case 2 is actually correct, because e-mails cannot be longer than 254 or 256 characters. But case 4 is not, and goes against case 16: both should be true or both should be false (to be consistent at the very least since there cannot be spaces at domains). And as I mentioned, case 14 also goes against the rules for valid e-mail addresses by having a real number as a domain.
Cases 4 and 14 now have a correct_answer of false, per the explanation by Rafael S.T. Vieira.
You should really add some unusual email addresses like "@"@example.com or "\""@example.com or root@[127.0.0.1] to the test suite!