wildstar
    Preparing search index...

    Function replace

    • Replaces capture references in a replacement path with actual capture values

      Parameters

      • placeholder: string

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

      • captures: string[]

        Array of captured substrings

      Returns string

      The replaced, normalized path

      If the replacement pattern is invalid

      replace('foo <1>', ['baz']) // returns 'foo baz'
      replace('Hello <> <>!', ['beautiful', 'world']) // returns 'Hello beautiful world!'
      replace('<> <1>', ['middle']) // returns 'middle middle middle'