[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastParen [Back]  [Original]

RegExp.lastParen ($+) - JavaScript | MDN

MDN Web Docs

View in English Always switch to English

RegExp.lastParen ($+)

Deprecated

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.

: RegExp RegExp

RegExp.lastParen RegExp["$+"]

lastParen RegExp RegExp RegExp.lastParen RegExp["$+"]

lastParen RegExp RegExp lastParen lastParen undefined

(RegExp.$+) + SyntaxError

lastParen $+

js
const re = /(hi)/g;
re.test("hi there!");
RegExp.lastParen; // "hi"
RegExp["$+"]; // "hi"

Legacy RegExp features
# additional-properties-of-the-regexp-constructor


Web Proxy Viewer  |  New URL  |  Original Page