94
JavaScript RegExp.prototype.toString() Method
The toString() method returns a string which represents the regular expression.
Syntax
Parameters
NA
Return value
This method returns the string representing the given object.
Example 1
Output:
Returned value : /(?:)/g
Example 2
Output:
/a+b+c/g/ gt+yu// abcd// n/g
Example 3
Output:
Returned value : /script/g Returned value : /(?:)/g
Next TopicJavaScript RegExp