HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)

152 Chapter4
Advanced Forms Design
PATTERN MATCH
PATTERN MATCH
Used to test a field value against a pattern of characters.
Syntax
MATCH
pattern
["
message
"]
Parameters
pattern
A pattern of characters which indicate which type of character in which
position is acceptable input for this field.
message
Specifies a custom error message.
Discussion
The pattern match allows you to check field values against a general pattern. It can be
used to check the actual value, but actual values are more easily checked in the Single
Value, Table, or Range tests. This test is generally used to test the type of character
entered in a particular position. Before data is checked against a pattern, any leading and
trailing blanks are stripped.
NOTE
Native Language Support does not support pattern matching with native
language characters. MATCH uses USASCII (NATIVE-3000) rules. For more
information on Native Language Support, see Section 8.
Special Pattern Characters
The pattern consists of a series of special characters that indicate the type of USASCII
data that can be entered in that position. These characters are:
a upper or lowercase alphabetic character (A-Z, a-z)
u uppercase alphabetic character (A-Z)
l lowercase alphabetic character (a-z)
b blank
d digit (0-9)
? any character
The beginning of the pattern is defined by the first nonblank character after MATCH and, in
the simplest case, is terminated by the first blank encountered. A pattern beginning or
ending with the special character b will interpret the b as the alphabetic character and not
the special character indicating a blank. Leading and trailing blanks should be indicated
as spaces within a grouping as described on the next page.
A pattern may contain embedded blanks only if it is enclosed within braces {}. Also, a