Division of Information Technology
Web Publishing @ SFSU
Wildcard Patterns

Wildcard Patterns Wildcard patterns are an easy way to specify a number of different items all at the same time. With wildcard patterns, a number of strings can all match your pattern at the same time, saving you the trouble of having to enter each possible string that you want to match.

Specifying a Pattern When you specify a pattern in the " .nsconfig" file, you create a string that has special characters in it. They define a particular pattern that the string must match - through them, you specify important parts of a string, and specify how a string must match the less important parts. They are very similar to wildcards under UNIX and MS-DOS.
Special Characters The special characters you can use are:
  • * matches zero or more characters.

  • ? matches exactly one character, and it can be any character.

  • (one*two) is an "or" expression. It will match either the substring one, or the substring two. The substrings can contain other special characters such as $.

  • $ matches the end of the string. This is really only useful in "or" expressions.

  • [abc] matches one occurence of the characters a, b, or c. Within these expressions, the only character that needs to be escaped in this is ], all others are not special.

  • [a-z] matches one occurence of a character between a and z.

  • [^az] matches any character except a or z.

  • ~ followed by another shell expression will remove any pattern matching the shell expression from the match list (a logical not)

Additionally, if you want to use a special character, but without the special meaning, you can precede it with a backslash (\).

About | Getting Started | Create | Publish | Enhance | Advertise | Maintain
Index | Glossary | Software | For more Information


SFSU Home   Search   Need Help?  

1600 Holloway Avenue, San Francisco, CA 94132 (415) 338-1111
Last modified February 11, 2008 by the Web Team