toString()

Returns the string representation of a regular expression object. This function is an implementation of the standard JavaScript RegExp toString() method.

Example

var reg = new RegExp('a+b+c');
alert(reg.toString());  // returns "/a+b+c/"