| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/RegExp/compile | [Back] [Original] |
Get to know MDN better
Avoid using this feature in new projects.
The compile() method duplicates behavior of the RegExp() constructor and it exists only for backwards compatibility.
This feature may be a candidate for removal from web standards or browsers.
:
compile() compile() RegExp()
compile() RegExp RegExp
compile(pattern, flags)
const regexObj = /foo/gi;
regexObj.compile("new foo", "g");
| ECMAScript 2027 LanguageSpecification # sec-regexp.prototype.compile |
| Web Proxy Viewer | New URL | Original Page |