mj62mj62
asked on
Solaris egrep Regex (Regular Expression) for a valid email address
Hello,
Does anyone have a good egrep Regex for what constitutes a valid email address?
I could do some basic checks, but I thought why not ask if someone already has one. Perhaps certain characters aren't allowed and perhaps some unexpected ones are permitted - i don't know.
Thank You,
MJ
Does anyone have a good egrep Regex for what constitutes a valid email address?
I could do some basic checks, but I thought why not ask if someone already has one. Perhaps certain characters aren't allowed and perhaps some unexpected ones are permitted - i don't know.
Thank You,
MJ
ASKER
Yikes - that may have been a bit more than I had in mind.
I only need to sanity check it, maybe I'll stick with something relatively simple I write myself.
hmmm.....
I only need to sanity check it, maybe I'll stick with something relatively simple I write myself.
hmmm.....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
/@_._
is invalid, I guess that you can find much more invalid examples for this really simple regex than for my whitelist aproach (which is not perfect, but see the very first suggestion and following comment:)
is invalid, I guess that you can find much more invalid examples for this really simple regex than for my whitelist aproach (which is not perfect, but see the very first suggestion and following comment:)
If you need some good stuff about Egrep Regular Expressions, just check this link: http://linuxreviews.org/beginner/tao_of_regular_expressions/
Ops... I forgot to send this link also, just for experts: http://www.ussg.iu.edu/UAU/advcomm/regexp.html
hmm, I don't see how http:#16651655 answers (for someone unused to regex) the question: regex for valid email address.
be prepared for a huge and sophisticated regex ;-)