# regexp

Locked, prototype-pollution-resistant copy of the global `RegExp` constructor.

The `RegExp` constructor is wrapped in a [`createRegExp`](https://www.hyperfrontend.dev/docs/libraries/utils/immutable-api/built-in-copy/regexp/#api-createRegExp) factory at module-load time and frozen into a tamper-proof namespace, so pattern construction keeps working even if the global `RegExp` is later patched. Effective only when imported before any untrusted code has had a chance to mutate the prototype chain.

---

Canonical page: https://www.hyperfrontend.dev/docs/libraries/utils/immutable-api/built-in-copy/regexp/
This file: https://www.hyperfrontend.dev/docs/libraries/utils/immutable-api/built-in-copy/regexp.md
Documentation index: https://www.hyperfrontend.dev/llms.txt
