Expression Syntax for Allowed Characters

The filter string has two possible expressions. The first expression allows any character to be entered into the edit control, and this expression is simply a string that contains only the "*" (asterisk) character. The second expression lists the characters that are valid to be entered or that are invalid to be entered into the edit control. This expression is shown in Augmented Backus-Naur Form (ABNF) in the following format:

"[" *1("~") 1*(char-val / char-val "-" char-val) "]"

The expression MUST be included in square brackets ("[]"). When the first character inside the brackets is the tilde ("~") character, the expression represents characters that are not allowed in the edit control; otherwise, it represents only the characters that are allowed in the edit control. The rest of the characters inside the brackets are characters or ranges of characters to be allowed or disallowed from the edit control.

To represent any character that is a special character in this expression syntax with a backslash character ("\"), the backslash character can be placed in front of the character. The backslash character will be ignored, and the character that follows it will be treated as a normal character and not as a special character. To represent a single character to allow/disallow, the character (with the leading backslash if necessary) is put in the string. To represent a range of characters to allow/disallow, the first character in the range is put in the string, followed by a dash ("-") character, followed by the final character in the range. The combination of all individual characters and character ranges is the set of characters that will be allowed or disallowed.

For example, if only the characters A, F, and T through Z are allowed to be entered into the control, the expression is:


If all characters except the"[" (which will need the backslash character) and Z characters are allowed, the expression is: