Home
About
Policies
FAQ
Forums
Registration
Password Recovery

Smatch (MPI)

From Tapestries MUCK

(Difference between revisions)
Jump to: navigation, search
 
(2 intermediate revisions not shown)
Line 1: Line 1:
-
[[Category:MPI functions]]
+
[[Category:functions (MPI)]][[Category:String Functions (MPI)]]
=smatch=
=smatch=
-
<mpi>{smatch:str,pattern}
+
<mpi>{smatch:str,pattern}</mpi>
Matches 'str' against the wildcard pattern.
Matches 'str' against the wildcard pattern.

Latest revision as of 01:41, 31 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