Previous Contents Index Next |
Sun Java System Application Server Standard and Enterprise Edition 7 2004Q2 Developer's Guide to NSAPI

> ## Appendix B
> Wildcard Patterns

> This appendix describes the format of wildcard patterns used by the Sun Java System Application Server.

> Wildcard patterns use special characters. If you want to use one of these characters without the special meaning, precede it with a backslash (\) character.

> ##

> Wildcard Patterns

> The following table shows wildcard patterns.

> Table B-1 Wildcard Patterns

> Pattern | Use
> --- | ---
> * | Match zero or more characters.
> ? | Match exactly one occurrence of any character.
> | | An or expression. The substrings used with this operator can contain other special characters such as * or $. The substrings must be enclosed in parentheses, for example, (a|b|c), but the parentheses cannot be nested.
> $ | Match the end of the string. This is useful in or expressions.
> [abc] | Match one occurrence of the characters a, b, or c. Within these expressions, the only character that needs to be treated as a special character is ]; all others are not special.
> [a-z] | Match one occurrence of a character between a and z.
> [^az] | Match any character except a or z.
> *~ | This expression, followed by another expression, removes any pattern matching the second expression.

> ##

> Wildcard Examples

> The following table shows wildcard examples.

> Table B-2 Wildcard Examples

> Pattern | Result
> --- | ---
> *.sun.com | Matches any string ending with the characters .sun.com.
> (quark|energy).sun.com | Matches either quark.sun.com or energy.sun.com.
> 198.93.9[23].??? | Matches a numeric string starting with either 198.93.92 or 198.93.93 and ending with any 3 characters.
> *.* | Matches any string with a period in it.
> *~sun-* | Matches any string except those starting with sun-.
> *.sun.com~quark.sun.com | Matches any host from domain sun.com except for a single host quark.sun.com.
> *.sun.com~(quark|energy |neutrino).sun.com | Matches any host from domain .sun.com except for hosts quark.sun.com, energy.sun.com, and neutrino.sun.com.
> *.com~*.sun.com | Matches any host from domain .com except for hosts from subdomain sun.com.
> type=*~magnus-internal/* | Matches any type that does not start with magnus-internal/. This wildcard pattern is used in the file obj.conf in the catch-all Service directive.

> Previous Contents Index Next

> Copyright 2004 Sun Microsystems, Inc. All rights reserved.