18. Working with Data Types and Data Display Formats : String Input Templates : String Template Creation : User-defined Characters
 
Share this page                  
User-defined Characters
In addition to the predefined special characters for string templates, you are given five special characters whose meaning you can define. This is done by associating one of the user-defined special characters with a custom character set. This feature makes it easy to define a custom character set and specify that set in several positions in your custom template.
To use a user-defined special character, you define the special character at the first instance of its use in the template and put the special character in the template for subsequent occurrences.
The special characters reserved for user definition are i, j, k, l, and m.
In the same way that each of the predefined characters are defined to represent some set of characters, you can define each of these special characters to represent some set of one or more characters. To do this, use the following syntax:
[c=c1{c2}]
The c is one of the five special characters (i, j, k, l, or m) and c1 and c2 represent the characters that you want to include in the set of characters defined for the special character. You can include any number of characters in the set.
You can also specify a range of characters for your special character:
[c=c1‑c2]
In this case, c represents the special character, c1 represents the beginning of the range, and c2 represents its end.
When you include a user‑defined special character in a template, the first instance of the character in the template must be its definition. For subsequent occurrences, you just use the special character. For example, assume that you want to build a template in which the special character j represents the numbers 4 and 6. An example of such a template is:
[j=46]aazaj
The above template describes a field of six characters, of which the first and last must be either a 4 or a 6. Another example is:
nn[j=46]njj
This example describes a field of six characters also, in which the third, fifth, and sixth must be either a 4 or a 6.