Microsoft® JScript®
lastIndex Property
 Language Reference 
Version 3 

See Also                  Applies To


Description
Returns the character position where the last successful match begins in a searched string.
Syntax
RegExp.lastIndex
Remarks
The lastIndex property is zero-based, that is, the index of the first character is zero. Its value is modified whenever a successful match is made.

The lastIndex property is modified by the exec and test methods of the RegExp object, and the match, replace, and split methods of the String object.

The following rules apply to values of lastIndex: