Federated Naming Service Programming Guide

Wildcarded Strings

A wildcarded string consists of a sequence of alternating wildcard specifiers and strings. The sequence can start with either a wildcard specifier or a string, and end with either a wildcard specifier or a string.

The wildcard specifier is denoted by the asterisk character (*) and means 0 or more occurrences of any character.

Wildcarded strings can be used to specify substring matches. Table 2-8 contains examples of wildcarded strings and their meaning.

Table 2-8 Examples of Wildcarded Strings

Wildcarded String 

Meaning 

*

Any string 

`tom'

The string tom

`harv'*

Any string starting with harv

*'ing'

Any string ending with ing

`a'*'b'

Any string starting with a and ending with b

`a*b'

The string a*b

`jo'*'ph'*'ne'*'er'

Any string starting with jo, and containing the substring ph, and which contains the substring ne in the portion of the string following ph, and which ends with er

%s*

Any string starting with the supplied string 

`bix'*%s

Any string starting with bix and ending with the supplied string