import { Types } from './Types.js'; import type { IDataMockInit } from '../Types.js'; export interface RegExpOptions { /** * The maximum amount of times a repetition like `+` or `{min,}` should be repeated. * If the regex enforces its own maximum (e.g. `{1,3}`), that explicit maximum overrides this option * if it is smaller. * @default 10 */ max?: number; /** * Optional regex flags. For example, `'i'` enables case-insensitive generation. */ flags?: string; } /** * Generates pseudo-random strings that match a given regular expression pattern. * Uses the deterministic central `Types` generator making it fully seedable. */ export declare class RegExp { protected types: Types; /** * Initializes the RegExp generator. * @param init The configuration options including the random generator seed. */ constructor(init?: IDataMockInit); /** * Sets the deterministic seed for the internal random value generator. * @param value A numerical seed value. */ seed(value?: number): void; /** * Generates a random string that matches the provided regular expression pattern. * * @param pattern The regular expression pattern (either a RegExp object or a string). * @param options Additional generation options. * @returns A randomly produced string fulfilling the constraints of the pattern. * * @example * ```ts * const generator = new RegExp(); * generator.fromPattern(/^[a-z0-9]{5}$/); // e.g. "a1b2c" * ``` */ fromPattern(pattern: string | globalThis.RegExp, options?: RegExpOptions): string; private _gen; private _processSet; private static _toCaseInverse; private _coin; private _choice; } //# sourceMappingURL=RegExp.d.ts.map