正则表达式方法

RegExp.prototype.compile var regexObj = new RegExp("foo", "gi"); // /foo/gi console.log(regexObj); var reg = regexObj.compile("new foo", "g"); console.log(reg); // /new foo/g RegExp.prototype.exec
相关文章
相关标签/搜索