Documentation - v7.19.0
    Preparing search index...

    Function extractRegexMatch

    • Executes a RegExp against a string, resetting its lastIndex to prevent stateful matching.

      Parameters

      • candidate: string

        The string to match.

      • extractor: RegExp

        The pattern used to extract a value.

      Returns string | undefined

      The first capture group if nonempty, otherwise the full match, or undefined if there is no match.