Excluding specific characters

When you specify the format of character, object and data fields, you can use brackets to limit the valid characters.

Examples:

N[1357] One of four possible digits: 1, 3, 5, or 7

N[1357](3) Three digits, each of which can be 1, 3, 5, or 7

X[#]N[4] A "#" character and then 4

An exclusion symbol, "^", is available to disallow invalid characters. In order to disallow characters, the symbol must be in the first position of the string. All characters following the "^" are disallowed.

When using the exclusion symbol in combination with a hyphen (-), the hyphen must be the last character before the closing bracket (]).

Examples:

N[^135] Any digit except 1, 3, or 5

X[^^] An invalid specification

X[^_*#-](3-25) - Three to twenty five characters but not "_", "*", "#", or "-".

X[^_-*#](3-25) - An invalid specification, because the hyphen (-) is not the last character before the closing bracket.

If the "^" is not at the beginning of the string, then "^" is a valid character.

Example:

X[#<^135] One of six possible characters: "#", "<", "^", 1, 3, or 5

Ignore unit designations