正则表达式——捕获组的概念探索(JavaScript API)
问题来源在MDN介绍String.prototype.match()的示例中,举了这么一个例子:var str = 'For more information, see Chapter 3.4.5.1';var re = /see (chapter \d+(\.\d)*)/i;var found = str.match(re);console.log(found);// logs [ 'see Chapter 3.4.5.1',// 'Chapter 3.4.5.1',//
原创
2022-04-16 22:21:35 ·
877 阅读 ·
0 评论