RegExp.prototype.toString

Returns a string representation of the regular expression.

Syntax

toString()

Return value

A string.

Examples

/[a-z]/g.toString()
"/[a-z]/g"