构造正则表达式
构造正则表达式
// 字面量
/pattern/flags
// 构造函数
new RegExp(pattern [, flags])
// 工厂函数
RegExp(pattern [, flags])正则表达式结构

Last updated
Was this helpful?
// 字面量
/pattern/flags
// 构造函数
new RegExp(pattern [, flags])
// 工厂函数
RegExp(pattern [, flags])
Last updated
Was this helpful?
Was this helpful?
/^一起学习[\d]{1,2}\s(RegExp)$/g.exec('一起学习01 RegExp');
// ["一起学习01 RegExp", "RegExp", index: 0, input: "一起学习01 RegExp", groups: undefined]