kaplan1
asked on
Checking legal email address string
In my C++ program I need to check whether or not a string is a legal email address.
Does anyone know if there is a library function somewhere for doing this, and if
not, what are the rules for this function.
Does anyone know if there is a library function somewhere for doing this, and if
not, what are the rules for this function.
http://www.alternic.net/info/rfcs/800/rfc822.txt
hi!
I think you need to check for few things in the string
1- '@' sign
2- '.' after @ sign
3- look for .net,.gov,.com,.org
i think you already know this
I think you need to check for few things in the string
1- '@' sign
2- '.' after @ sign
3- look for .net,.gov,.com,.org
i think you already know this
Here are some rules:
1. There must be no blank spaces.
2. There must be one (and only one) '@'-sign.
3. Only letters, numbers and following characters allowed:
hyphen (-), dot (.) and underscore (_).
4. The part after the '@'-sign must contain at least one dot (.).
I hope you will find it usefull.
1. There must be no blank spaces.
2. There must be one (and only one) '@'-sign.
3. Only letters, numbers and following characters allowed:
hyphen (-), dot (.) and underscore (_).
4. The part after the '@'-sign must contain at least one dot (.).
I hope you will find it usefull.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The proposed rules are incorrect.
More than one @ can appear in a valid email address,
as can blank spaces, or any other character when properly quoted.
More than one @ can appear in a valid email address,
as can blank spaces, or any other character when properly quoted.