Wild card

From TinyMUX
(Redirected from Wildcard)
Jump to navigation Jump to search

Wild cards are a means for matching multiple parts of an input string. Wild cards are also known as globs. A wild card can often be specified as part of command input for commands that act on attributes. For example, to examine yourself for all attributes containing the term site, you can use the command: examine me/*site*.

The asterisk character (*) matches any number of characters in the input string. The question mark (?) character matches only a single character on the input line. For example, examine me/v? would match any two letter attribute stored on my player object such as VA, VB, etc.

The softcode functions match() and strmatch() perform wildcard matching for arbitrary text.

More complex and flexible matching can be achieved through the use of regular expressions.