正则的扩展详解

RegExp() 在es5中,RegExp的构造函数参数有两种情况 1、字符串 2、正则表达式 // 第一种情况 let regex = new RegExp('abc', 'i') // 第二种情况 let regex2 = /abc/i

View post