The RegExp.prototype
property represents the prototype object for the RegExp
constructor.
Property attributes of RegExp.prototype
| |
---|---|
Writable | no |
Enumerable | no |
Configurable | no |
See RegExp
for a description of RegExp
instances. RegExp
instances inherit from RegExp.prototype
. Modifications to the prototype object are propagated to all RegExp
instances.
See also deprecated RegExp
properties.
Note that several of the RegExp
properties have both long and short (Perl-like) names. Both names always refer to the same value. Perl is the programming language from which JavaScript modeled its regular expressions.
RegExp.prototype.constructor
RegExp.prototype.flags
RegExp
object.RegExp.prototype.global
RegExp.prototype.ignoreCase
RegExp.prototype.multiline
RegExp.prototype.source
RegExp.prototype.sticky
RegExp.prototype.unicode
RegExp.prototype.compile()
RegExp.prototype.exec()
RegExp.prototype.test()
RegExp.prototype[@@match]()
RegExp.prototype[@@replace]()
RegExp.prototype[@@search]()
RegExp.prototype[@@split]()
RegExp.prototype.toSource()
Object.prototype.toSource()
method.RegExp.prototype.toString()
Object.prototype.toString()
method.Specification | Status | Comment |
---|---|---|
ECMAScript 3rd Edition (ECMA-262) | Standard | Initial definition. Implemented in JavaScript 1.1. |
ECMAScript 5.1 (ECMA-262) The definition of 'RegExp' in that specification. | Standard | |
ECMAScript 2015 (6th Edition, ECMA-262) The definition of 'RegExp.prototype' in that specification. | Standard | Added flags , sticky and unicode properties. |
ECMAScript Latest Draft (ECMA-262) The definition of 'RegExp.prototype' in that specification. | Draft |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | Yes | Yes | 1 | Yes | Yes | Yes |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | Yes | Yes | Yes | 4 | Yes | Yes | Yes |
Server | |
---|---|
Node.js | |
Basic support | Yes |
RegExp
Function.prototype
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/prototype