Pattern Variance Examples
Examples of various pattern variance types by showing example definition option settings, input values, and possible output values.
| Strategy | Settings | Example input/output | Notes |
|---|---|---|---|
| Mask the weight and the unit of measure from a product code, but preserve the product type. |
Definition 1: Definition type: Preserve Starting position: 1 Ending position: 3 Value: <blank> Undefined: Position 4 and 5. Definition 2: Definition type: String Starting position: 6 Ending position: 9 Value: GAL|qt|pt|oz|CUP |
Input value: MLK12CUP Possible output values: MLK63GAL MLK18pt MLK04oz |
Definition 1: Preserves the first three positions using the preserve pattern variance. Undefined: Masks the fourth and fifth positions using the default pattern variance, which replaces each numeric character with a value from 0-9. Definition 2: Masks the sixth through the eighth positions with one of the values listed using the string pattern variance. Notice that in some cases, the software replaces a 3-character substring with a 2-character value. |
| Mask the product type and the weight from a product code, but preserve the unit of measure. |
Definition 1: Definition type: String Starting position: 1 Ending position: 3 Value: ALMLK| SOYMLK| RCEMLK| WTMLK| CHMLK Definition 2: Definition type: String Starting position: 4 Ending position: 5 Value: 01-12| 32| 16 Definition 3: Definition type: Preserve Starting position: 6 Ending position: <end of column> Value: <blank> |
Input value: MLK12CUP Possible output values: WTMLK32CUP RCEMLK16CUP ALMLK08CUP |
Definition 1: Masks the first three positions using one of the values specified for string pattern variance. The application masks the 3-character substring with values that may be longer than 3 characters. Definition 2: Masks the fourth and fifth positions using the string pattern variance. The first value listed in the Value option for Definition 2 is a range beginning with a zero-padded number. This ensures that the mask value is the length of the defined substring, 2 characters. Definition 3: Preserves the sixth through the eighth positions. |
| Mask the number of paper sheets per package, and the type of packaging from the product description column. |
Definition 1: Definition type: Character Starting position: 1 Ending position: 4 Value: 0-9 Undefined: Position 5. Definition 2: Definition type: String Starting position: 6 Ending position: <end of column> Value: Ream| Case| Pack| Box |
Input value: 1500/Ream Possible output values: 0950/Case 8945/Box 2639/Pack |
Definition 1: Masks the first through the fourth positions with a number from 0-9. The user could leave the first through the fifth position undefined so the application masks the substring using the default pattern variance to get similar output values. The forward slash would be output as part of the substring in this case. Undefined: Outputs the forward slash (/) character in the fifth position using the default pattern variance (maintains special characters on output). Definition 2: Mask the sixth position to the end of the column with one of the character strings listed in the Value option. |
| Mask the school district, the state, and the enrollment number. Preserve the type of school. |
Definition 1: Definition type: String Starting position: 1 Ending position: 3 Value: DST Definition 2: Definition type: String Starting position: 4 Ending position: 5 Value: ST Undefined: Position 6, 7, 8, and 9. Definition 3: Definition type: Preserve Starting position: 10 Ending position: <end of column> Value: <blank> |
Input value: INDNE7321MID ANMA7321HIGH SNBCA7321ELEM Possible output values: DSTST3829MID DSTST5784HIGH DSTST0789ELEM |
Definition 1: Masks position one to three with the string “DST”. Definition 2: Mask the fourth and the fifth position with the string “ST”. Undefined: Masks position six through nine with the default pattern variance. Definition 3: Preserves the tenth position to the end of the column. |
