/** * 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) * * ```ts import.meta.vitest * import { RegExp } from "effect" * * const pattern = new RegExp.RegExp("hello", "i") * pattern // => /hello/i * pattern.test("Hello World") // => true * pattern.test("goodbye") // => false * ``` * * @stability stable * @category constructors * @since 4.0.0 */ export declare const RegExp: RegExpConstructor; /** * Checks whether a value is a `RegExp`. * * **When to use** * * Use to validate unknown input before treating it as a regular expression. * * **Example** (Checking for regular expressions) * * ```ts import.meta.vitest * import { RegExp } from "effect" * * RegExp.isRegExp(/a/) // => true * RegExp.isRegExp("a") // => false * ``` * * @stability stable * @category guards * @since 3.9.0 */ export declare const isRegExp: (input: unknown) => input is RegExp; /** * Escapes special characters in a regular expression pattern. * * **When to use** * * Use to turn literal text into a safe regular expression pattern fragment. * * **Example** (Escaping a pattern string) * * ```ts import.meta.vitest * import { RegExp } from "effect" * * RegExp.escape("a*b") // => "a\\*b" * ``` * * @stability stable * @category transforming * @since 2.0.0 */ export declare const escape: (string: string) => string; //# sourceMappingURL=RegExp.d.ts.map