字面量创建正则
const r=/test/;
对象创建正则
let r1=new RegExp("test")
调用
console.log(r.test('test')) console.log(r1.test("test"))
i 大小写不敏感
let reg=/abc/i console.log(reg.test('ABC')) //true
g
m
y
u