English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
JavaScript RegExp RegExp Object
toString()The method returns a string representing the regular expression.
regex.toString()
var regex = new RegExp("oldtoolbag.com", "gi"); var ans = regex.toString();Test See‹/›
All browsers fully support the toString() method:
Method | |||||
toString() | Yes | Yes | Yes | Yes | Yes |
Return Value: | Represents the string of the given object |
---|---|
JavaScript Version: | ECMAScript 1 |