Creates a new regex-based comparison token.
The regular expression for this token.
Optionaldata: unknownOptional user-defined payload.
ReadonlydataOptional user-defined payload attached to this token.
ReadonlytokenThe regular expression used for matching.
Returns a short label prefixed with Regex:.
A concise string identifying this regex token.
Determines whether this regex matches another token.
The token to compare against.
true if the regex matches the other token's string.
Only ComparisonUnitTokenString is supported as a comparison target. The regex is tested against the other token's string value.
Error if other is not a ComparisonUnitTokenString.
Returns a formatted string representation of this token.
Number of leading spaces.
A formatted, human-readable string.
A ComparisonUnitToken that matches using a regular expression.
Remarks
When compared against a ComparisonUnitTokenString, the regex stored in tokenRegex is tested against the other token's string value. Comparing against another
ComparisonUnitTokenRegexis not supported.Example