正则表达式语法二
?
?
?
??? i?????? 执行对大小写不敏感的匹配。?
new RegExp("feifei","i")
直接量语法: /feifei/i
var str="Visit W3School";
var patt1=/w3school/i;
Visit W3School
new RegExp("feifei","g")
直接量语法: /feifei/g
var str="Is this all there is?";
var patt1=/is/g;
Is this all there is?
?
?
?
?
?
?
?
?
1 楼 a_bin 2011-07-06 http://www.w3school.com.cn/js/jsref_obj_regexp.asp 2 楼 a_bin 2011-09-13 if(!/^((\d){6,8})$/.exec(obj.value))