Regular Expressions JavaScript Tutorial

The lastIndex property gets the index of where the next match begins.