effect-io-ai

Package: effect
Module: RegExp

RegExp.RegExp

Exposes the JavaScript regular expression constructor from globalThis.

When to use

Use to construct JavaScript regular expressions through the Effect module namespace.

Example (Creating a regular expression)

import { RegExp } from "effect"

// Create a regular expression using Effect's RegExp constructor
const pattern = new RegExp.RegExp("hello", "i")

// Test the pattern
console.log(pattern.test("Hello World")) // true
console.log(pattern.test("goodbye")) // false

Signature

declare const RegExp: RegExpConstructor

Source

Since v4.0.0