Skip to content

Conversation

@jsann
Copy link

@jsann jsann commented Dec 5, 2014

之前的正则有bug,a@aaaa可以验证通过

之前的正则有bug,a@aaaa可以验证通过
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确实用错,不用那么复杂:

/^(?:[a-z0-9]+[_\-+.]+)*[a-z0-9]+@(?:([a-z0-9]+-?)*[a-z0-9]+\.)+([a-z]{2,})+$/i

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants