Table of contents
- 1. Summary
- 2. Description
- 3. Properties
- 4. Methods
- 5. See also
Summary
Represents the prototype object for the RegExp constructor.
Description
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.
Properties
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.
constructor- Specifies the function that creates an object's prototype.
global- Whether to test the regular expression against all possible matches in a string, or only against the first.
ignoreCase- Whether to ignore case while attempting a match in a string.
lastIndex- The index at which to start the next match.
multiline- Whether or not to search in strings across multiple lines.
source- The text of the pattern.
sticky- New in Firefox 3 Non-standard
- Whether or not the search is sticky.
Methods
- See also Deprecated RegExp Methods
exec- Executes a search for a match in its string parameter.
test- Tests for a match in its string parameter.
toSource- Non-standard
Returns an object literal representing the specified object; you can use this value to create a new object. Overrides theObject.prototype.toSourcemethod. - toString
- Returns a string representing the specified object. Overrides the
Object.prototype.toStringmethod.
Methods inherited from
Object:__defineGetter__, __defineSetter__, hasOwnProperty, isPrototypeOf, __lookupGetter__, __lookupSetter__, __noSuchMethod__, propertyIsEnumerable, toLocaleString, unwatch, valueOf, watch