Skip to content

Instantly share code, notes, and snippets.

@ziluo
Created November 28, 2012 03:13
Show Gist options
  • Save ziluo/4158815 to your computer and use it in GitHub Desktop.
Save ziluo/4158815 to your computer and use it in GitHub Desktop.
JS验证邮箱正则表达式
var myreg = /^([a-zA-Z0-9]+[_|_|.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|_|.]?)*[a-zA-Z0-9]+.[a-zA-Z]{2,4}$/;
@pendave
Copy link

pendave commented Nov 15, 2016

无法匹配啊

不信你自己测试这里的文本 view-source:https://www.ncbi.nlm.nih.gov/pubmed/26769084

@eachmawzw
Copy link

正解

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