分享几个邮件正则

Expression

^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$
Matches
 
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
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
 
Non-Matches
mohit<[email protected]> | Xon <[email protected]>, tom <[email protected]> | [email protected],
 
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})+)*$

你可能感兴趣的:(正则)