A delimiter is a character that indicates the start and end of a token. By default, AMS uses spaces as the only delimiters, but you can define any characters as delimiters. For each message, you can define a set of delimiter characters or an ordered list of delimiter characters.
Note: Using delimiters other than spaces reduces the efficiency of pattern matching.
Spaces as Delimiters
This illustration shows a message whose delimiters are spaces, the default delimiter.
Assuming that spaces are the only delimiters, the message
XX/YY//ZZ A:/B C
yields the following 3 tokens:
XX/YY//ZZ A:/B C
AMS considers multiple spaces to be a single delimiter such as between B and C in the message above.
Delimiter Sets
A delimiter set is a number of delimiter characters that can occur in any order in a message. If two or more of these characters are adjacent to each other, they are treated as a single delimiter. Assume the following message:
XX/YY//ZZ A:/B C
If a pattern has a delimiter set of {/} (a slash and a space), it produces the following 6 tokens:
XX YY ZZ A: B C
If a pattern has a delimiter set of {:/} (a colon and a slash), the same message yields the following 4 tokens:
XX YY ZZ A B C
Delimiter List
A delimiter list is a string of character delimiters that you specify in the exact order that they must appear from left to right in the message. Assume the following message:
XX/YY//ZZ A:/B C
If a pattern has a delimiter list of "// " (slash, slash, space, space), the message is parsed by delimiters slash, slash, space, space in this order. The rules for the consecutive delimiters being counted as 1 is still in effect. It produces the following 5 tokens:
XX YY ZZ A:/B C
If a pattern has a delimiter list of "/:/" (slash, space, colon, slash), the same message yields the following 4 tokens:
XX YY//ZZ A B C
The characters : and / are treated as a single delimiter because they occur adjacent to each other in the message with no intervening characters. You specify the delimiter character only once in the list if it appears in two or more consecutive positions.
All delimiters in a list must be found in the message in order to match the pattern. For example, using a delimiter list of "////" results in the following 4 tokens:
XX YY ZZ A: B C
Since only three of the four slashes match the delimiters in the message, the message does not match the pattern.