分享几个邮件正则
Expression
^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$
Matches
joe@aol.com | ssmith@aspalliance.com | a@b.cc
Non-Matches
joe@123aspx.com | joe@web.info | joe@company.co.uk
Expression
^[0-9]{1,}(,[0-9]+){0,}$
Matches
1111 | 47,26,2,1,1111,12 | 25,1245,2122,23232
Non-Matches
111, | 1a1,111,1212,23 | 11aa,aaa,asas,asa
Expression
^([a-z0-9]+([\-a-z0-9]*[a-z0-9]+)?\.){0,}([a-z0-9]+([\-a-z0-9]*[a-z0-9]+)?){1,63}(\.[a-z0-9]{2,7})+$
Matches
800-med-alert.com | jump.to | archive-3.www.regexlib.com
Non-Matches
example | a-.domain.com | http://regexlib.com/
Expression
\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*([,;]\s*\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*)*
Matches
lewis@moten.com | lewis@moten.com, me@lewismoten.com | lewis@moten.com;me@lewismoten.com
Non-Matches
lewis@@moten.com
Expression
^[a-zA-Z]+(([\'\,\.\- ][a-zA-Z ])?[a-zA-Z]*)*\s+<(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})>$|^(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})$
Matches
Mohit <myadav@yahoo.com> | Xon <JON@jon.com> | Xon@something.com
Non-Matches
mohit<myadav@yahoo.com> | Xon <JON@jon.com>, tom <jon@jon.com> | Xon@somthing.com,
Expression
^(([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+([;.](([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+)*$
Matches
te_s-t@ts.co.in;te_s-t@ts.co.in;te_s-t@ts.co.in
Non-Matches
nospace@between.mailids.in ; only@semi.colons.com
Expression
^(\w+([_.]{1}\w+)*@\w+([_.]{1}\w+)*\.[A-Za-z]{2,3}[;]?)*$
Matches
jaimohann@yahoo.com | jai.mohan@yahoo.com | jai.mohan@yahoo.co.in | jaimohann@yahoo.com;jai.mohan@yahoo.com;jai.mohan@yahoo.co.in
Non-Matches
jai..mohan@yahoo.com | jai.mohan@yahoo.co.inkk