Skip to content

Pattern Matching

11 built-in function(s) in this category.

  • Blank — _ or Blank[] represents any single expression. (Stable)
  • BlankNullSequence — ___ or BlankNullSequence[] represents a sequence of zero or more expressions. (Stable)
  • BlankSequence — __ or BlankSequence[] represents a sequence of one or more expressions. (Experimental)
  • Default — Default[f] (Experimental)
  • HoldPattern — HoldPattern[expr] (Stable)
  • Longest — Longest[p] is a pattern object that matches the longest sequence consistent with the pattern p. (Stable)
  • MatchQ — MatchQ[expr, form] (Stable)
  • Optional — patt:def or Optional[patt, def] (Stable)
  • Repeated — p.. or Repeated[p] is a pattern object that represents a sequence of one or more expressions, each matching p. (Stable)
  • RepeatedNull — p... or RepeatedNull[p] is a pattern object that represents a sequence of zero or more expressions, each matching p. (Stable)
  • Shortest — Shortest[p] is a pattern object that matches the shortest sequence consistent with the pattern p. (Stable)