Link to home
Start Free TrialLog in
Avatar of mj62mj62
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
Avatar of ahoffmann
ahoffmann
Flag of Germany image

http://examples.oreilly.com/regex/

be prepared for a huge and sophisticated regex ;-)
Avatar of mj62mj62
mj62mj62

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.....
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
/@_._
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.