Skip to content

Instantly share code, notes, and snippets.

@chrisyip
Created Jan 7, 2014
Embed
What would you like to do?
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