RegExp["$&"] (Property)

An alternative way to refer to the text of the most recent successful pattern match.


JavaScript - 1.2
JScript - 5.5
Internet Explorer - 5.5
Netscape - 4.0
Netscape Enterprise Server - 3.0
Opera - 5.0
Property/method value type:String primitive
JavaScript syntax:-myRegExp["$&"]

This property uses the array index notation because the property name contains punctuation characters that would cause syntactic errors if the property name were not in quotes.


See also:RegExp.lastMatch

Property attributes: