Created
January 7, 2014 06:30
-
-
Save chrisyip/8295426 to your computer and use it in GitHub Desktop.
Regex Collection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 邮箱 | |
/^(?:[a-z0-9]+[_\-+.]?)*[a-z0-9]+@(?:([a-z0-9]+-?)*[a-z0-9]+.)+([a-z]{2,})+$/i | |
// 手机:13012345678 - 19012345678 | |
/^1[3-9]\d{9}$/ | |
// 座机:02012345678、020-12345678、020 12345678、12345678,1234567 | |
/^(?:((?:0\d{2,3}[- ]?)?[1-9]\d{6,7})|(?:[48]00[- ]?[1-9]\d{6}))$/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment