DOCUMENTATION CENTER SEARCH
Mathematica
>
Pattern Matching Functions
>
Built-in
Mathematica
Symbol
Putting Constraints on Patterns
Tutorials »
|
StringMatchQ
See Also »
|
Pattern Matching Functions
Patterns
Rules & Patterns
Testing Expressions
More About »
MatchQ
MatchQ
[
expr
,
form
]
returns
True
if the pattern
form
matches
expr
, and returns
False
otherwise.
EXAMPLES
CLOSE ALL
Basic Examples
(3)
Test if an expression is an integer:
In[1]:=
Out[1]=
Test if an expression is a sum of two or more terms:
In[1]:=
Out[1]=
In[2]:=
Out[2]=
Test if an expression is explicitly zero:
In[1]:=
Out[1]=
In[2]:=
Out[2]=
SEE ALSO
StringMatchQ
TUTORIALS
Putting Constraints on Patterns
MORE ABOUT
Pattern Matching Functions
Patterns
Rules & Patterns
Testing Expressions
RELATED LINKS
NKS|Online
(
A New Kind of Science
)
New in 1
© 2008 Wolfram Research, Inc.