我想为所有包括非斜体字符的电子邮件地址编写正则表达式。
我试过但它返回错误
请尽快提供正确的解决方案
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/xregexp/3.1.1/xregexp-all.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script type="text/javascript">
var em = XRegExp('^([\\p{L}+|\\p{N}*][@][\\p{L}+][.][\\p{L}+])$'); // Please help me to correct it
jQuery(function(){
jQuery('input').blur(function(){
console.log(jQuery(this).val());
console.log(em.test(jQuery('#t1').val()));
});
});
</script>
<title></title>
</head>
<body>
Enter Name: <input type="text" name="t1" id="t1" class="kcd">
</body>
</html>