SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Variable WildCardConst

    WildCard: {
        isWildCard: (obj: Scalar) => boolean;
        toRegex: (
            lookupText: string,
            flags?: any,
            anchor?: boolean | "start",
        ) => RegExp;
    } = ...

    Wildcard syntax: * for any run of characters, ? for exactly one, ~ to escape.

    Type Declaration

    • isWildCard: (obj: Scalar) => boolean

      Indicates if the give item is a wildcard string.

    • toRegex: (lookupText: string, flags?: any, anchor?: boolean | "start") => RegExp

      Compiles Excel wildcard text into a regex.

      ~ escapes the next *, ? or ~; before anything else it is dropped, not kept — SEARCH("~b","abc") is 2 and MATCH("a~b",…) finds the text ab. A caller that reaches this compiler only when the pattern holds a * or ? — which is what COUNTIF and its family do — therefore still compares "a~b" literally, because that criteria never becomes a pattern.

      One left-to-right pass; chained replaces cannot express the escape, since by the time a pass could unescape ~* the * has already become .*.