Home
About
Policies
FAQ
Forums
Registration
Password Recovery

Smatch (MPI)

From Tapestries MUCK

(Difference between revisions)
Jump to: navigation, search
(smatch)
Line 1: Line 1:
-
[[Category:MPI functions]]
+
[[Category:MPI functions]][[Category:MPI String Functions]]
=smatch=
=smatch=
<mpi>{smatch:str,pattern}</mpi>
<mpi>{smatch:str,pattern}</mpi>

Revision as of 16:23, 30 March 2007

smatch

{smatch:str,pattern}

Matches 'str' against the wildcard pattern.

If there is a match, this returns true, or "1". If it doesn't match, this returns a value of "0", or false.

In wildcard patterns, the following characters have the following meanings:

    *               matches any number of any character.
    ?               matches one character, of any type.
    [abcde]         matches one char, if it is a, b, c, d, or e.
    [a-z]           matches one char, if it is between a and z, inclusive.
    [^abd-z]        matches one char is it is NOT a, b, or between d and z.
    {word1|word2}   matches one word, if it is word1, or word2.
    {^word1|word2}  matches one word, if it is NOT word1 or word2.
    \               escapes any of the prev chars, making it not special.
Personal tools
Namespaces
Variants
Actions
navagation
information
wiki
Toolbox