match - luxembourg/muxcode-clm GitHub Wiki
MATCH()
FUNCTION: match(<string>, <pattern>[, <delim>])
This function matches <pattern> against each word of <string>, returning the number of the first word that matches. If no words match then 0 is returned. The case of the characters being matched is not significant.
The pattern may contain the wildcards '' and '?'. '?' matches any one character, while '' matches any number of characters, including none. So 's?x' would match 'sex' or 'six', but not to 'socx', but 's*x' would match any of them.
<delim> may be used specified to specify a delimiter other than a space.
Examples: > say match(This is a test, test) You say, "4" > say match(This is a test, is) You say, "2" > say match(This is a test, is) You say, "1" > say match(This is a test, not) You say, "0" > say match(This is a test, is a) You say, "0"