JS: RegExp Object
What is the Keyword “RegExp”
RegExp
is the value of the property key "RegExp"
of the Global Object
.
window.RegExp === RegExp
Type
Type of RegExp
is a function.
// type of RegExp console.log( typeof RegExp === "function" );
Parent
Parent of RegExp
is Function.prototype.
Reflect.getPrototypeOf ( RegExp ) === Function.prototype
Purpose
Purpose of RegExp
is:
- To create RegExp objects.
- Used as a namespace to hold static methods.
- Holds the property key
"prototype"
. Its value is the parent of all instance of regex.
Constructor
Properties
JavaScript, Regular Expression
- JS: RegExp Tutorial
- JS: Regex Functions
- JS: RegExp Syntax
- JS: RegExp Flag
- JS: Regex Replace String Dollar Sign
- JS: Regex Replace Function Args
- JS: RegExp Object
- JS: RegExp Constructor
- JS: RegExp.prototype
- JS: String.prototype.search
- JS: String.prototype.match
- JS: String.prototype.matchAll
- JS: String.prototype.replace
- JS: String.prototype.replaceAll
- JS: RegExp.prototype.test
- JS: RegExp.prototype.exec