Sun Java System Messaging Server 6.3 Administration Guide Mapping Entry Patterns

Patterns can contain wildcard characters. In particular, the usual wildcard characters are allowed: an asterisk (*) matches zero or more characters, and each percent sign (%) matches a single character. Asterisks, percent signs, spaces, and tabs can be quoted by preceding them with a dollar sign ($). Quoting an asterisk or percent sign robs it of any special meaning. Spaces and tabs must be quoted to prevent them from ending prematurely a pattern or template. Literal dollar sign characters should be doubled ($$), the first dollar sign quoting the second one.

Table 10–3 Mapping Pattern Wildcards



Match exactly one character. 

Match zero or more characters, with maximal or “greedy” left-to-right matching 

Back match


$ n* 

Match the nth wildcard or glob. 




Use minimal or “lazy” left-to-right matching. 


Turn off “saving” of the succeeding wildcard or glob. 


Turn on “saving” of the succeeding wildcard or glob; this is the default. 

Glob wildcard



Match one alphabetic character, A-Z or a-z. 


Match zero or more alphabetic characters, A-Z or a-z. 


Match one binary digit (0 or 1). 


Match zero or more binary digits (0 or 1). 


Match one decimal digit 0-9. 


Match zero or more decimal digits 0-9. 


Match one hexadecimal digit 0-9 or A-F. 


Match zero or more hexadecimal digits 0-9 or A-F. 


Match one octal digit 0-7. 


Match zero or more octal digits 0--7. 


Match one symbol set character, for example, 0-9, A-Z, a-z, _, $. 


Match zero or more symbol set characters, that is, 0-9, A-Z, a-z, _, $. 


Match one tab or vertical tab or space character. 


Match zero or more tab or vertical tab or space characters. 


A synonym for $H%. 


A synonym for $H*. 

$[ c]% 

Match character c. 

$[ c]* 

Match arbitrary occurrences of character c. 

$[ c1 c2 ... cn ]%

Match exactly one occurrence of character c1, c2, or cn.

$[ c1 c2 ... cn ]*

Match arbitrary occurrences of any characters c1, c2, or cn.

$[ c1 -cn ]%

Match any one character in the range c1 to cn.

$[ c1 -cn ]*

Match arbitrary occurrences of characters in the range c1 to cn.

$< IPv4> 

Match an IPv4 address, ignoring bits. 


Match an IPv4 address, keeping prefix bits. 


Match an IPv6 address. Note that IPv6 connection handling is not currently supported in Messaging Server. 

Within globs, that is, within a $[...] construct, the backslash character, (\) is the quote character. To represent a literal hyphen, -, or right bracket, ], within a glob the hyphen or right bracket must be quoted with a backslash.

All other characters in a pattern just represent and match themselves. In particular, single and double quote characters as well as parentheses have no special meaning in either mapping patterns or templates; they are just ordinary characters. This makes it easy to write entries that correspond to illegal addresses or partial addresses.

To specify multiple modifiers, or to specify modifiers and a back match, the syntax uses just one dollar character. For instance, to back match the initial wild card, without saving the back match itself, one would use $@0, not $@$0.

Note that the imsimta test -match utility may be used to test mapping patterns and specifically to test wildcard behavior in patterns.

Asterisk wildcards maximize what they match by working from left to right across the input string. For instance, when the input string a/b/c is compared to the pattern */*, the left asterisk matches a/b and the right asterisk matches the remainder, c.

The $_ modifier causes wildcard matching to be minimized, where the least possible match is considered the match, working from left to right across the pattern. For instance, when the string a/b/c is compared to the pattern $_*/$_*, the left $_* matches a and the right $_* matches b/c.