Mathematica 9 is now available
 Documentation / Mathematica / Built-in Functions / Programming / Pattern Matching  /
MatchQ

  • MatchQ[ expr , form ] returns True if the pattern form matches expr, and returns False otherwise.
  • See the Mathematica book: Section 2.3.5.
  • See also: StringMatchQ.

    Further Examples

    A pattern that doesn't match and some that do.

    In[1]:=

    Out[1]=



    Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
    THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
    SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.