|
|
|
has a [[Prototype]] internal slot whose value is NOTE The initial value of RegExp.prototype.constructor RegExp.prototype.constructor Performs a regular expression match of string against the regular expression and returns an Array object containing the results of the match, or null if string did not match. The String ( string ) is searched for an occurrence of the regular expression pattern as follows: 1. Let R be the this value. 2. Perform ? ( R , [[RegExpMatcher]]). 3. Let S string ). 4. Return ? R , S ). The abstract operation RegExpExec takes arguments R and S . It performs the following steps when called: 1. : R ) is Object. 2. : S ) is String. 3. Let exec ( R , "exec" ). 4. If exec ) is true , then a. Let result be ? exec , R , « S »). b. If ( result ) is neither Object nor Null, throw a TypeError exception. c. Return result . 5. Perform ? ( R , [[RegExpMatcher]]). 6. Return ? R , S ). NOTE The abstract operation RegExpBuiltinExec takes arguments R and S . It performs the following steps when called: 1. : R is an initialized RegExp instance. 2. : S ) is String. 3. Let length be the number of code units in S . 4. Let lastIndex be ( R , "lastIndex" ))). The RegExp prototype object does not have a "valueOf" property of its own; however, it inherits the "valueOf" property from the . If a callable "exec" property is not found this algorithm falls back to attempting to use the built-in RegExp matching algorithm. This provides compatible behaviour for code written for prior "exec" . 22.2.5.1 RegExp.prototype.constructor 22.2.5.2 RegExp.prototype.exec ( string ) 22.2.5.2.1 RegExpExec ( R , S ) 22.2.5.2.2 RegExpBuiltinExec ( R , S ) 621 |