| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastMatch | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
Avoid using this feature in new projects.
The RegExp static properties may have unintended side effects.
This feature may be a candidate for removal from web standards or browsers.
: . , , . , , , .
lastMatch . . RegExp.$&.
RegExp.lastMatch RegExp['$&']
lastMatch , RegExp.lastMatch RegExp['$&'].
lastMatch .
"&" SyntaxError, (RegExp.$&) . (RegExp['$&']).
lastMatch $&var re = /hi/g;
re.test("hi there!");
RegExp.lastMatch; // "hi"
RegExp["$&"]; // "hi"
. - .
RegExp.input ($_)RegExp.lastParen ($+)RegExp.leftContext ($`)RegExp.rightContext ($')RegExp.$1-$9This page was last modified on 17 . 2024 . by MDN contributors.
RegExpObject/FunctionObject.prototype.__defineGetter__()Object.prototype.__defineSetter__()Object.prototype.__lookupGetter__()Object.prototype.__lookupSetter__()Object.prototype.hasOwnProperty()Object.prototype.isPrototypeOf()Object.prototype.propertyIsEnumerable()Object.prototype.toLocaleString()Object.prototype.toString()Object.prototype.valueOf()Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |