

MatchQ
Examples
open all close allBasic Examples (3)
Scope (10)
Match a rule in an association, using an association as a pattern:
KeyValuePattern lets you match any element in an association:
It also works on lists of rules:
Match a rule in an association with a condition:
Match a Rule in an association using Alternatives:
Use Verbatim to match a literal blank:
_ or Blank has special meaning in an association used as a pattern:
Use __ or BlankSequence to match more than one rule in an association:
Match an association containing a given rule and possibly more:
See Also
StringMatchQ FreeQ MemberQ Replace Pattern
Function Repository: PatternBindings CheckMatch ASTPattern
Tech Notes
Related Guides
Related Links
History
Introduced in 1988 (1.0) | Updated in 2014 (10.0)
Text
Wolfram Research (1988), MatchQ, Wolfram Language function, https://reference.wolfram.com/language/ref/MatchQ.html (updated 2014).
CMS
Wolfram Language. 1988. "MatchQ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/MatchQ.html.
APA
Wolfram Language. (1988). MatchQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MatchQ.html
BibTeX
@misc{reference.wolfram_2025_matchq, author="Wolfram Research", title="{MatchQ}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/MatchQ.html}", note=[Accessed: 13-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_matchq, organization={Wolfram Research}, title={MatchQ}, year={2014}, url={https://reference.wolfram.com/language/ref/MatchQ.html}, note=[Accessed: 13-August-2025]}