import { MatchRegExp, ParseRegExp, MatchAllRegExp, RegExpMatchResult, ReplaceWithRegExp } from 'type-level-regexp/regexp'; export { spreadRegExpIterator, spreadRegExpMatchArray } from 'type-level-regexp/regexp'; import { F as Flag, J as Join, I as InputSource, b as MapToValues, c as MapToGroups, U as UnionToTuple } from './shared/magic-regexp.Cp7m-ws-.mjs'; export { h as Input, a as MagicRegExpMatchArray, D as MapToStringCapturedBy, S as StringCapturedBy, k as anyOf, y as carriageReturn, e as caseInsensitive, l as char, i as charIn, j as charNotIn, q as digit, f as dotAll, B as exactly, g as global, t as letter, x as linefeed, A as maybe, m as multiline, z as not, C as oneOrMore, s as sticky, v as tab, u as unicode, r as whitespace, w as withIndices, n as word, p as wordBoundary, o as wordChar } from './shared/magic-regexp.Cp7m-ws-.mjs'; declare const NamedGroupsS: unique symbol; declare const ValueS: unique symbol; declare const FlagsS: unique symbol; type MagicRegExp = RegExp & { [NamedGroupsS]: NamedGroups; [ValueS]: Value; [FlagsS]: Flags; }; declare const createRegExp: { /** Create Magic RegExp from Input helpers and string (string will be sanitized) */ (...inputs: Inputs): MagicRegExp<`/${Join, '', ''>}/`, MapToGroups, []>; extends infer F extends Flag[] ? F : never>(...inputs: [...Inputs, [...Flags] | string | Set]): MagicRegExp<`/${Join, '', ''>}/${Join}`, MapToGroups, Flags>; }; declare global { interface String { match(this: InputString, regexp: MagicRegExp<`/${RegExpPattern}/${Join}`, string, Flags>): MatchRegExp, Flag[] extends Flags ? never : Flags[number]>; /** @deprecated String.matchAll requires global flag to be set. */ matchAll[]>>(regexp: R): never; matchAll(this: InputString, regexp: MagicRegExp<`/${RegExpPattern}/${Join}`, string, Flags>): MatchAllRegExp, Flag[] extends Flags ? never : Flags[number]>; /** @deprecated String.matchAll requires global flag to be set. */ matchAll>(regexp: R): never; replace, MatchResult = MatchRegExp, Match extends any[] = MatchResult extends RegExpMatchResult<{ matched: infer MatchArray extends any[]; namedCaptures: [string, any]; input: infer Input extends string; restInput: string | undefined; }, { index: infer Index extends number; groups: infer Groups; input: string; keys: (...arg: any) => any; }> ? [...MatchArray, Index, Input, Groups] : never>(this: InputString, regexp: MagicRegExp<`/${RegExpPattern}/${Join}`, string, Flags>, replaceValue: ReplaceValue | ((...match: Match) => ReplaceValue)): any[] extends RegExpParsedAST ? never : ReplaceWithRegExp; /** @deprecated String.replaceAll requires global flag to be set. */ replaceAll>(searchValue: R, replaceValue: string | ((substring: string, ...args: any[]) => string)): never; /** @deprecated String.replaceAll requires global flag to be set. */ replaceAll[]>>(searchValue: R, replaceValue: string | ((substring: string, ...args: any[]) => string)): never; } } export { Flag, type MagicRegExp, createRegExp };