Skip to content

Instantly share code, notes, and snippets.

@chrisyip
Created January 7, 2014 06:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisyip/8295426 to your computer and use it in GitHub Desktop.
Save chrisyip/8295426 to your computer and use it in GitHub Desktop.
Regex Collection
// 邮箱
/^(?:[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