📜  正则表达式重用模式 - Javascript 代码示例

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

代码示例1
let repeatNum = "42 42 42";
let reRegex = /^(\d+)\s\1\s\1$/;
let result = reRegex.test(repeatNum);