var regex = /^[a-z\-A-Z_0-9]{1,}\u0040[_\-0-9a-zA-Z]{1,65}\.[a-zA-Z]{2,}$/;
document.write(regex.check("hi@email.com"));
最佳答案
您的代码不会输出任何内容,因为 RegExp 中不存在 check 方法。您应该使用 RegExp.test方法
关于javascript - 这个正则表达式有什么问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4541962/