| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp | [Back] [Original] |
Get to know MDN better
const regex1 = /\w+/;
const regex2 = new RegExp("\\w+");
console.log(regex1);
// /\w+/
console.log(regex2);
// /\w+/
console.log(regex1 === regex2);
// false
new RegExp(pattern)
new RegExp(pattern, flags)
RegExp(pattern)
RegExp(pattern, flags)
RegExp .
/ab+c/i;
new RegExp(/ab+c/, "i"); //
new RegExp("ab+c", "i"); //
new RegExp('ab+c') ()
| ECMAScript 2027 LanguageSpecification # sec-regexp-constructor |
RegExpObject/FunctionObject.prototype.__defineGetter__()Object.prototype.__defineSetter__()Object.prototype.__lookupGetter__()Object.prototype.__lookupSetter__()Object.prototype.hasOwnProperty()Object.prototype.isPrototypeOf()Object.prototype.propertyIsEnumerable()Object.prototype.toLocaleString()Object.prototype.toString()Object.prototype.valueOf()| Web Proxy Viewer | New URL | Original Page |