export type RegexFlags = { global: boolean; ignoreCase: boolean; multiline: boolean; dotAll: boolean; }; export type CharacterKind = "digit" | "word" | "space"; export type CharacterClassItem = { type: "character"; value: string; } | { type: "range"; from: string; to: string; } | { type: "kind"; kind: CharacterKind; negated: boolean; }; export type RegexNode = { type: "empty"; } | { type: "literal"; value: string; } | { type: "dot"; } | { type: "anchor"; kind: "start" | "end"; } | { type: "wordBoundary"; negated: boolean; } | { type: "characterClass"; negated: boolean; items: CharacterClassItem[]; } | { type: "sequence"; elements: RegexNode[]; } | { type: "alternation"; alternatives: RegexNode[]; } | { type: "group"; capturing: boolean; index?: number; body: RegexNode; } | { type: "quantifier"; body: RegexNode; min: number; max?: number; greedy: boolean; }; export type RegexPattern = { source: string; flags: RegexFlags; captureCount: number; body: RegexNode; }; export declare function parseRegex(source: string, flags?: string): RegexPattern;