wildstar
    Preparing search index...

    Function match

    • Matches a path against a pattern with wildcards and captures

      Parameters

      • source: string

        The input path to match

      • pattern: string

        The pattern path, may contain *, *+, **, **+ wildcards

      • OptionalcharCompare: CharCompare

        Optional custom code point comparison function

      Returns null | string[]

      Array of captures if matched, or null if not

      match('foo/bar/baz/wow.txt', "foo/**+/wow.*") // returns ['bar/baz', 'txt']