2017年6月30日
摘要: var str = '1abc2defg3hijk'; str.replace(/\d/g,function(a,b,c,d){ console.log("a:",a);// 匹配到的字符 console.log("b:",b);// 匹配时的字符最小索引位置(RegExp.index) console.log("c:",c);// 被匹配的字符串(RegExp.inpu... 阅读全文
posted @ 2017-06-30 17:16 yanyiyi 阅读(152) 评论(0) 推荐(0) 编辑