Name

lastMatch — NN 4 IE J3 ECMA n/a

Synopsis

Read-only

Returns the string that matches the regular expression as a result of the most recent operation. The short version is $&.

Example

var matched = RegExp.lastMatch

Value

String.

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.