正则表达式空格怎么写 \s 匹配任何空白字符,包括空格、制表符、换页符等等。等价于 [ \f\n\r\t\v]。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 re=/^[a-zA-Z][a-zA-Z0-9\.\_\-\s]*@([a-zA-Z0-9-_]+\.)+(com|gov|net|com\.cn|edu\.cn)$/; 我这么做了 /^[a-zA-Z][a-zA-Z0-9._ -]*@([a-zA-Z0-9-_]+\.)+(com|gov|net|com\.cn|edu\.cn)$/ /^[a-zA-Z][a-zA-Z0-9._\s-]*@([a-zA-Z0-9-_]+\.)+(com|gov|net|com\.cn|edu\.cn)$/提示如下错误 字符集越界 hbhbhbhbhb1021(天外水火(我要多努力)) 的方法认为 effort [email protected] 是不合法的格式 不会是不合法的,不过感觉这个正则写得不是太好<script language=javascript> re=/^[a-zA-Z][a-zA-Z0-9\.\_\-\s]*@([a-zA-Z0-9-_]+\.)+(com|gov|net|com\.cn|edu\.cn)$/; alert(re.test("effort [email protected]"))</script> <SCRIPT LANGUAGE="JavaScript">function check(){var s ="effort [email protected]";var re=/\w+\@\w+[[\.\w+]|[\.\w+\.\w+]]$/;alert(re.test(s));}</SCRIPT> 新人求助 js火狐问题 看不懂 怎么增加删除前的确认? 这一段匹配的正常表达式怎么写呢。谢谢 图片提交表单为什么成了直接打开/下载PHP文件? 如何拦截https请求 self和this javascript如何分割字符串?类似asp中的split 请教简单的参数传递! 我写的一个关于javascript读取cookie内容的function 江湖救急,“EasyUI ComoBox” 多选时的 Bug。 给select用appendChild添加option出现问题,添加完成列表出现项,但是显示空白! 请叫高手怎样学习javascript?有比较好的教程吗?介绍一下
/^[a-zA-Z][a-zA-Z0-9._ -]*@([a-zA-Z0-9-_]+\.)+(com|gov|net|com\.cn|edu\.cn)$/
/^[a-zA-Z][a-zA-Z0-9._\s-]*@([a-zA-Z0-9-_]+\.)+(com|gov|net|com\.cn|edu\.cn)$/提示如下错误
字符集越界
<script language=javascript>
re=/^[a-zA-Z][a-zA-Z0-9\.\_\-\s]*@([a-zA-Z0-9-_]+\.)+(com|gov|net|com\.cn|edu\.cn)$/;
alert(re.test("effort [email protected]"))
</script>
function check()
{
var s ="effort [email protected]";
var re=/\w+\@\w+[[\.\w+]|[\.\w+\.\w+]]$/;
alert(re.test(s));
}
</SCRIPT>