JavaScript: RegExp Object

By Xah Lee. Date: . Last updated: .

RegExp is the value of the property key "RegExp" of the Global Object .

console.log( 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.

console.log( Reflect.getPrototypeOf ( RegExp ) === Function.prototype );

Purpose

Purpose of RegExp is:

Constructor

RegExp Constructor

Properties

JavaScript Regular Expression


BUY Ξ£JS JavaScript in Depth