Glossary Term
RegExp: lastIndex
The lastIndex data property of a RegExp instance specifies the index at which to start the next match.
This property is set only if the regular expression instance used the g flag to indicate a global search, or the y flag to indicate a sticky search. The following rules apply when exec() is called on a given input:
If lastIndex is greater than the length of the input, exec() will not find a match, and lastIndex will be set to 0. If lastIndex is equal to or less than the length of the input, exec() will attempt to match the input starting from lastIndex. If exec() finds a match, then lastIndex will be set to the position of the end of the matched string in the input. If exec() does not find a match, then lastIndex will be set to 0.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
