| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/RegExp/leftContext | [Back] [Original] |
Get to know MDN better
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.leftContext RegExp["$`"]
leftContext RegExp RegExp RegExp.leftContext RegExp["$`"]
leftContext RegExp RegExp leftContext leftContext undefined
(RegExp.$` ) ` SyntaxError
$` String.prototype.replace() RegExp["$`"]
const re = /world/g;
re.test("hello world!");
RegExp.leftContext; // "hello "
RegExp["$`"]; // "hello "
| Legacy RegExp features # additional-properties-of-the-regexp-constructor |
| Web Proxy Viewer | New URL | Original Page |