1、捕获项是在匹配项里查找还是原字符串里查找?
2、为什么(\.\d)捕获项不是.4或者.4.5.1而是.1?
function r1(){
var re= /see (Chapter \d+(\.\d)*)/i
var str='For more information, see Chapter 3.4.5.1'
var found = str.match(re);
console.log(found);
}
r1()
ibeautiful
相关分类