lastMatch

The last matched characters. $& is another name for the same property.

Property of

RegEx

Description

Because lastMatch is static, it is not a property of an individual regular expression object. Instead, you always use it as RegExp.lastMatch.