wildstar
    Preparing search index...

    Function remap

    • Matches a path against a pattern and replaces using the replacement path if matched

      Parameters

      • source: string

        The input path to match

      • pattern: string

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

      • replacement: string

        The replacement path, may contain <1>, <2>, ... for captures

      • OptionalcharCompare: CharCompare

        Optional custom code point comparison function

      Returns null | string

      The replaced normalized path if matched, or null if not matched

      remap('foo/bar/baz', 'foo/**+/baz', '<1>/foo') // returns 'bar/foo'