Examplesopen allclose all
Basic Examples (3)
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:
Match an association containing three elements:
Wolfram Research (1988), MatchQ, Wolfram Language function, https://reference.wolfram.com/language/ref/MatchQ.html (updated 2014).
Wolfram Language. 1988. "MatchQ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/MatchQ.html.
Wolfram Language. (1988). MatchQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MatchQ.html