This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / Programming / Pattern Matching  /

  • 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.