RegExp
Tools for working with JavaScript regular expressions from the Effect module namespace. The module exposes the native RegExp constructor, a guard for narrowing unknown values, and escaping for literal text that will be embedded in a pattern.
Reach for RegExp when you need to build a regular expression from user or data-driven text, check whether an unknown value is already a RegExp, or access the native constructor without leaving the Effect namespace.
Exposes the JavaScript regular expression constructor from
globalThis.When to use
Use to construct JavaScript regular expressions through the Effect module namespace.