User manual - TE_SmartClient_UsersManual

NAURTECH TERMINAL EMULATION & DATA COLLECTION WEB BROWSER FOR WINDOWS CE / WINDOWS MOBILE
CETerm | CE3270 | CE5250 | CEVT220 Page 76
Replace: "Name:\1 Account:\2"
The quantity between curly brackets "{}" is an exact number of characters to match.
The first ".{4}" will match, and ignore, the first four characters of track 1.
The "(.{20})" will match the next 20 characters which can be specified in the replace text
as "\1".
The next ".*" skips past the remainder of track 1 data.
The "([0-9]{10})" says to match exactly 10 digits and make them available as "\2"
because this is the second set of parenthesis.
The "[0-9]" means any character in the set from '0' to '9'. This may also be represented as
"[0123456789]".
Example 3
As a third example, we can identify the data between "delimiter" characters. Often, a cardholder
name is found between '^' characters.
Match: "\^([^^]+)\^.*T2:.*=([0-9]{20})"
Replace: "Name:\1 Account:\2"
The leading "\^" means to match the '^' character, not the start of the data.
The backslash '\' removes the "special" meaning of the '^'.
The "([^^]+)" may seem complicated. Remember that the "[...]" identifies a set of
characters to match. If there is a leading '^' in the set, it means to match anything
*except* the characters in the set. For example, "[^abc]" means any characters except for
'a', 'b', and 'c'. The second '^' in the set has *no* special meaning and is interpreted as a
literal '^' character. So, this means to match any characters *except* a '^'.
The plus sign '+' means to match one or more of the characters designated by the set, so
this will match one or more characters up to, but not including, the next '^' character. The
result is that we identify all characters between a pair of '^' characters and assign this to
"\1" for replacement.
After the "T2:" we have ".*=" which will match any characters and then an equal sign.
Following the equal sign is "([0-9]{20})" which will match a 20 digit account number.
Replace Expressions
The Replace string can have more than literal text and the match replacement symbols. You can
insert special characters, special keys, and emulator actions. There are 3 levels of substitution for
the Replace string.
Level 1
& - replaced by "whole match"