YouTip LogoYouTip

Jsref Regexp Tostring

# JavaScript RegExp toString() Method [![Image 3: RegExp Object Reference](#) JavaScript RegExp Object](#) ## Example Return the string value of the regular expression: var patt = new RegExp("", "g"); var res = patt.toString(); [Try it Yourself Β»](#) * * * ## Definition and Usage The toString() method returns the string value of the regular expression. * * * ## Browser Support The numbers in the table specify the first browser version that fully supports the method. | Method | | | | | | | --- | --- | --- | --- | --- | --- | | toString() | Yes | Yes | Yes | Yes | Yes | * * * ## Syntax RegExpObject.toString() ## Parameters None. ## Technical Details | Return Value: | A string. | | --- | | JavaScript Version: | ECMAScript 1 | * * JavaScript RegExp Object](#) [](#)(#) [JavaScript Global Properties/Functions](#)[](#)
← Obj StorageJsref Entries β†’