RegExp API

The RegExp constructor creates a regular expression object for matching text with a pattern.

20 Total 2 Methods 18 Properties 1 Statics
  Show all

[Symbol.match]()

The [Symbol.match] method returns an array of matches or null.r[Symbol.match]()

[Symbol.matchAll]()

The [Symbol.matchAll] method returns an iterator of all matches.r[Symbol.matchAll]()

[Symbol.replace]

The [Symbol.replace] method replaces matched substrings.r[Symbol.replace]

RegExp[Symbol.species]

The [Symbol.species] accessor property returns the default constructor for RegExp objects. `RegExp[Symbol.species]()` => `/(?:)/` `RegExp[Symbol.species] === RegExp` is trueRegExp[Symbol.species]

constructor

The constructor property returns a reference to the RegExp function that created the instance object.r.constructor

dotAll

The dotAll property returns a boolean value that indicates whether the dot (.) matches line terminators.r.dotAll

escape

The escape() method returns a string representing the specified text, encoded for inclusion in a regular expression.r.escape

exec

The exec() method executes a search for a match in a specified string.r.exec

flags

The flags property returns a string containing the flags of the regular expression.r.flags

global

The global property returns a boolean value that indicates whether the g flag is set.r.global

hasIndices

The hasIndices property returns a boolean value that indicates whether the indices flag is set.r.hasIndices

ignoreCase

The ignoreCase property returns a boolean value that indicates whether the i flag is set.r.ignoreCase

multiline

The multiline property returns a boolean value that indicates whether the m flag is set.r.multiline

prototype

The prototype property allows the addition of properties and methods to an object.r.prototype

source

The source property returns the text of the RegExp pattern.r.source

sticky

The sticky property returns a boolean value that indicates whether the y flag is set.r.sticky

test

The test() method tests for a match in a string.r.test

toString

The toString() method returns a string representing the specified object.r.toString

unicode

The unicode property returns a boolean value that indicates whether the u flag is set.r.unicode

unicodeSets

The unicodeSets property returns a boolean value that indicates whether the v flag is set.r.unicodeSets

source

property

The source property returns the text of the RegExp pattern. r.source

You seem to be offline. App may not work.