This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

MatchQ

MatchQ
returns True if the pattern form matches expr, and returns False otherwise.
Test if an expression is an integer:
Test if an expression is a sum of two or more terms:
Test if an expression is explicitly zero:
Test if an expression is an integer:
In[1]:=
Click for copyable input
Out[1]=
 
Test if an expression is a sum of two or more terms:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
 
Test if an expression is explicitly zero:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
New in 1