Rockwell Automation 2755 Enhanced Decoder Series B User Manual

Page 139

Advertising
background image

10–4

Configuration: Host Message Replacement Rules

Publication 2755-833

A listing of valid metacharacters appears in the table below. Each
appears with a general explanation of its function and syntax. More
detailed examples of their use appear at the end of this chapter.

Note: The host replacement rules interpret a question mark
differently than does the match code table. As a metacharacter used
with the host replacement rules, a question mark is not interpreted as
a single character wild card. See Table 10.B and 10.C later in this
chapter.

Note: There are two distinct sets of metacharacters used by the host
message replacement rule software. One set applies only to search
patterns, and the other only to replacement strings. If the decoder
encounters a search pattern metacharacter in a replacement message,
it will interpret it as a standard ASCII character. Conversely, if the
decoder detects a replacement string metacharacter in a search
pattern, it will interpret it as a standard ASCII character. For
example, a “*” in a replacement string will be treated as normal text,
and “&” in a search pattern will be treated as normal text.

Use the characters described in the following tables to help establish
the exact search patterns that meet your needs. Proceed carefully,
however. While the individual metacharacters perform easily
understood actions, combining and nesting them will quickly create
extremely complex logical expressions. Be sure to test your
expressions thoroughly in the lower half of the screen to make
certain your search and replace strings perform as you expect them
to under the conditions you are liable to experience.

Table 10.A Search pattern metacharacters – position
dependent

Character

Description and Use

^

$

Note: The following two metacharacters are position-dependent. They
must appear in the location specified to be matched.

If the circumflex ( ^ ) is used as the first character in the search pattern,
it indicates that the characters, other metacharacters, expressions, or
strings must occur at the beginning of the string to be matched. Note that
the circumflex has a special meaning if used within square brackets, as
explained elsewhere in this chapter.

When the dollar sign is used as the last character in the search pattern,
it indicates that the characters, other metacharacters, expressions or
strings must occur at the end of the string to be matched.

Table 10.B Search pattern metacharacters – wildcard

Character

Description and Use

.

The period represents any single character, and is used as a
single-character “wildcard”.

Advertising