RegExp.toString

toString — Returns a string representation of the specified RegExp object.

Description

RegExp.toString()

Return values

string primitive.

Examples

Example #1 – toString example
console.log(new RegExp('[a-z]+', 'i').toString()); // /[a-z]+/i

External references