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 2017 Draft (ECMA-262) The definition of 'RegExp.prototype' in that specification. | Draft |
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |
RegExp
Function.prototype
© 2005–2017 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