@ac-essentials/misc-util
    Preparing search index...

    Function patternCapture

    • Enclose the pattern with a capture group, optionally named with name

      If name is not provided, the capture group will be non-capturing.

      Parameters

      • pattern: string

        The pattern to be captured.

      • Optionalname: string

        Optional name for the capture group.

      Returns string

      The pattern string enclosed in a capture group.