
Bulletin 2755
Single/Dual-Head Enhanced Bar Code Decoders
Product Data
17
Table 3
Search Pattern Metacharacters – Logical Operators and Other Special Functions
Character
Description and Use
[ ]
Square brackets ( [ ] ) instructs the rule to match an incoming string if any character
enclosed within the brackets appears in the string. A range of values can be
represented within the brackets by separating the first and last characters in the
range by a hyphen. Square brackets must be used in pairs.
Note: The circumflex ( ^ ) can be used as the first character within the square
brackets to reverse the sense of the expression.
Examples
[ABC]
Matches “A”, “B”, or “C”
[L–P]
Matches “L”, “M”, “N”, “O”, or “P”
[0 – 9]
Matches “0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, or “9”
[^A – Z]
Matches any character that is not upper case alphabetic
( )
Parentheses can be used in two different ways. They can be used in search
patterns to group characters and metacharacters to form expressions. Parentheses
must be used in pairs.
Examples
(AB)+
The plus sign applies to the expression (AB). Strings that
would
match this expression include: “AB”, “ABAB”, “123AB”,
and “AB123”.
Parentheses can also be used to identify strings for use in the Replace Entire String
With field. If a character, string, or expression is surrounded by parentheses in a
search pattern, then it can be later recalled in a replace pattern with the “\n”
metacharacter described elsewhere in this chapter.
Note: Parentheses may be nested to form complex expressions.
|
A vertical bar (the shifted “\” character on the keyboard) instructs the rule to match
an incoming string if the character or expression on the left or right of the vertical
bar appears in the string.
Examples
A | B
Matches “A” or “B”
abc|123
Matches “abc” or “123”
\
The backslash indicates that the following character, which would normally be
interpreted as a metacharacter, should instead be interpreted as a literal ASCII
character.
Note: The backslash is used differently in the Replace Patterns.
Example
\.
The period ( . ) will be interpreted as a period rather than a
single character wildcard.