UNPKG

@imhonglu/pattern-builder

Version:

Type-safe regular expression pattern builder for TypeScript with fluent API

21 lines 657 B
import type { PatternFlag } from "../types/pattern-flag.js"; export declare class PatternBuilder { source: string; constructor(source: string); anchor(position?: "start" | "end"): PatternBuilder; group(): this; nonCapturingGroup(): this; lookahead(): this; negateLookahead(): this; lookbehind(): this; negateLookbehind(): this; oneOrMore(): this; zeroOrMore(): this; exact(count: number): this; repeat(min: number, max?: number): this; optional(): this; clone(): PatternBuilder; toString(): string; toRegExp(...flags: PatternFlag[]): RegExp; } //# sourceMappingURL=pattern-builder.d.ts.map