Re: MC Wild Card characters?

Scott Raney (raney@metacard.com)
Thu, 27 Feb 1997 16:46:03 -0700 (MST)

On Thu, 27 Feb 1997, Phil Davis wrote:

> My turn...
>
> What is the official set of MetaCard "wild card" characters (and their
> meanings)? I can't find it anywhere in the docs.

There are two different sets: those used for the "filter" command, and
those used for the matchText function.

The filter characters are same as those supported by the UNIX shells:
? matches any single character
* matches any number of characters
[a-x] matches any character from "a" to "x"

The second set is for the matchText function, and is the set accepted
by the UNIX grep command (this following is from the matchText
function description in the MetaTalk Reference):
. matches any character
^ forces match to be at beginning of string
$ forces match to be at end of string
[chars] matches any of the characters in the set of chars. The
characters can be either characters allowed to match, or if ^
is the first character in chars, not allowed to match. You
can specify a range of characters by putting a - between them.
For example [a-z] matches any lower case alphabetic character.
(exp) matches the expression, and puts result in a variable
* matches zero or more of the preceding special character
+ matches one or more of the preceding special character
? matches zero or more of the same characters matched by the
previous special character
regex1 | regex2 matches either of the regular expressions regex1 or regex2

> Thanks.
>
> --
> Phil Davis
> phild@infosynth.com
> ------------------------------
> Information Synthesis, Inc.
> A Knowledge Transfer Company
> (503) 685-0306
>

***************************************************************
Scott Raney raney@metacard.com http://www.metacard.com
Any sufficiently advanced technology
is virtually indistinguishable from magic -- Clark's law