正则表达式中 test、exec、match 方法区别 alert(reg.test(str));vararr=reg.exec(str);alert(str.match(reg));alert(str.match(reg));//alert(str.match(reg)); Gyc 2011-10-31 14:26:13
javascript正则表达式学习笔记 alert(reg.lastIndex);varmatches=reg.exec(text);alert(text.match(reg));alert(text.search(reg));alert(text.search(reg));"; modaiairen 2012-12-01 15:43:39
js正则表达式中test,match,exec方法比较 varstr="1a1b1c";vararr=reg.exec(str);exec方法受参数g的影响。alert(str.match(reg));alert(str.match(reg));//alert(str.match(reg)); 陆成宗 2016-02-17 18:22:10
JavaScript验证正则表达式大全 return(reg.test(fData));varreg=newRegExp("^[\u0391-\uFFE5]$");varresult=0;returnreg.test(fData);returnreg.test(fData);} Gyc 2011-07-27 15:24:34
js验证文件正则表达式 varreg=/^.+(\.doc|\.docx)$/; if(!reg.test(filename)){ showMsgDiv('文件必须是word文档','文件上传'); returnfalse; } 小溪逆流 2011-08-30 15:36:43
js验证数字正则表达式(转载) d+(.d+)?$/;d+$/;]*([^<>\"\"])*$/, "currency":/^\d+(\.\d+)?\d+(\.\d+)?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0? 天高任鸟飞 2012-06-12 13:14:39
正则表达式-----笔记 cds?或者alert(RegExp.$_);或者alert(RegExp["$`"]);或者alert(RegExp["$'"]);或者alert(RegExp["$&"]);或者alert(RegExp["$+"]);//返回"s" 小溪逆流 2011-10-23 08:29:17