Processing order – Rockwell Automation 2755 Enhanced Decoder Series B User Manual
Page 142

10–7
Configuration: Host Message Replacement Rules
Publication 2755-833
Table 10.E Replacement string metacharacters
Character
Description and Use
\n
The backslash plus a number 1 through 9 recalls a previously saved
string. Any character, string or expression that is surrounded by
parentheses in the search pattern (as described earlier) can be recalled
by the replace pattern using the “\n” format. Since the parentheses may
be nested, the number “n” represents the order of the groupings as
defined by the order of the left parenthesis in the search pattern.
Examples
Search Pattern =
123(ABC)
Replace Entire String With =
\1
Incoming String =
123ABC456
Result for Host Message =
ABC
The search pattern above matches the incoming string. The Replace
Entire String With value states that the string identified within the first
parentheses should be sent to the host.
Search Pattern =
(123(ABC))
Replace Entire String With =
\1\2
Incoming String =
123ABC456
Result for Host Message =
123ABCABC
The search pattern above matches the incoming string. The Replace
Entire String With value states that the string identified within the first
parentheses (123ABC), plus the string identified by the second
parentheses(ABC) should be sent to the host.
&
When the ampersand ( & ) is used in a replacement pattern, it indicates
that the part of the string that matches the search pattern should be sent
to the host. Therefore, if the string read contains more characters than
the search pattern, then the additional characters are discarded.
Examples
Search Pattern =
123ABC
Replace Entire String With =
&
Incoming String =
123ABC
Result for Host Message =
123ABC
The search pattern matches the incoming string. The Replace Entire
String With value states that the string identified in the search pattern
should be sent to the host.
Search Pattern =
123ABC
Replace Entire String With =
&
Incoming String =
123ABC456
Result for Host Message =
123ABC
The search pattern matches the incoming string. The Replace Entire
String With value states that the string identified in the search pattern
should be sent to the host. This does not include the digits 456.
Processing Order
Matches are determined for each of the Host Message Fields (1
through 16) by applying the rule parameters as follows: