📌  相关文章
📜  javascript 访问正则表达式中的匹配组 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:25.636000             🧑  作者: Mango

代码示例1
string = "some string containing var userId = 117051";
var foundId = string.match(/var userId = (\d+)/)[1];
console.log(foundId); // "117051"