Current operand contents
The contents of the current operand are in left and right braces ({ }).
An example that uses calendar dates best illustrates this concept. When verifying dates, you want to verify the length of numbers. One example is as follows:
^ [{}LEN=4] | - | ^ [{}LEN=2] | - | ^ [{}LEN=2]
; format for ccyy-mm-dd
This pattern matches on 2009-07-08 but not on 07-08-09.
The pattern operands in the preceding example have the following meaning:
Operand | Symbol | Description |
---|---|---|
Operand [1] | ^ | A 4-digit number |
Operand [2] | - | A hyphen |
Operand [3] | ^ | A 2-digit number |
Operand [4] | - | A hyphen |
Operand [5] | ^ | A 2-digit number |
When character literals are in an equality test, the standard abbreviation is tested if one is available. If this fails, the original input is tested. The following examples show pattern operands when you have ROAD RD T in your classifications:
Pattern | Description |
---|---|
|
Compares the abbreviation of the current operand (RD) to the literal RD |
|
Compares the entire input operand to the literal (because it fails to compare to the abbreviation) |
|
Compares only the abbreviation of the current operand to RD |
|
Compares the original value of the token to ROAD and not to the abbreviation |
|
When comparisons (other than the equality operators)
are specified, the original input is used rather than the abbreviation. This is true for any comparison to a literal value. If the original value is RD, the result is true, but, if the original value is ROAD, the result is false. |