• A rule that executes a regex, transforming the match result.

    Type Parameters

    • T

    Parameters

    • expr: RegExp
    • onMatch: ((match: RegExpMatchArray) => T)

      When the expression matches, onMatch will be given the RegExpExecArray and return the final info object.

        • (match): T
        • Parameters

          • match: RegExpMatchArray

          Returns T

    Returns ((t: TokenizedUserAgent) => T | null)