JavaScript RegExp.prototype.toString() MethodThe toString() method returns a string which represents the regular expression. SyntaxParametersNA Return valueThis method returns the string representing the given object. Example 1Test it NowOutput: Returned value : /(?:)/g Example 2Test it NowOutput: /a+b+c/g/ gt+yu// abcd// \n/g Example 3Test it NowOutput: Returned value : /script/g Returned value : /(?:)/g
Next TopicJavaScript RegExp
|