SOURCE

let regex = /hello\d/;
let newregex = new RegExp("hello\\d","g");
let match = newregex.exec("aaahello3");
console.log(match[0]);
// console.log(match[1]);
console.log(typeof regex);
console.log(typeof newregex);
let array = new Array();
console.log(Object.prototype.toString.call(regex));
console 命令行工具 X clear

                    
>
console