Free Touch Pricker
    Preparing search index...

    Class Pattern

    Simple AbstractMatcher that uses a pattern to match rows.

    A string pattern is compared directly against provided rows. By default the pattern is compared against the bells at the back of the change, e.g.:

    const pat = new Pattern('5678');
    pat.match('43125678'); // true (matches)
    pat.match('43126578'); // false (doesn't match)
    pat.isWildcardMatch; // true
    pat.matchCount; // 1
    pat.print('text'); // '1 5678'

    It's also possible to check the bells at the front of the change:

    const pat = new Pattern('8765', '8765 off the front', MatchType.Front);
    pat.match('87654321'); // true
    pat.isWildcardMatch; // true
    pat.print('text'); // '1 8765 off the front'

    ... or check an entire row:

    const pat = new Pattern('13572468', 'Queens', MatchType.Row);
    pat.match('13572468'); // true
    pat.isWildcardMatch; // false
    pat.print('text'); // 'Queens'

    If no pattern name is provided then the pattern itself will be used when printing results.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _matchCount: number = 0

    Count of matches.

    _name?: string

    Name to use when printing results.

    _pattern: string

    String to match.

    _type: MatchType = MatchType.Back

    Type of match.

    print: Print

    Accessors

    • get matchCount(): number

      Provides read access to the count of matches.

      Returns number

    Methods