@ericwhitedev/lcsts
    Preparing search index...

    Class ComparisonUnitTokenRegex

    A ComparisonUnitToken that matches using a regular expression.

    When compared against a ComparisonUnitTokenString, the regex stored in tokenRegex is tested against the other token's string value. Comparing against another ComparisonUnitTokenRegex is not supported.

    const re = new ComparisonUnitTokenRegex(/^\d+$/);
    const str = new ComparisonUnitTokenString('42');
    console.log(re.isMatch(str)); // true

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    data: unknown

    Optional user-defined payload attached to this token.

    tokenRegex: RegExp

    The regular expression used for matching.

    Methods