RegExp: lastIndex - JavaScript | MDN
The lastIndex data property of a RegExp instance specifies the index at which to start the next match.