WLJS LogoWLJS Notebook

MatchQ

MatchQ[expr, form] returns True if expr matches the pattern form, and False otherwise.

Examples

Match against a pattern:

MatchQ[{1, 2, 3}, {__Integer}]
(* True *)

Match head:

MatchQ[f[x, y], _f]
(* True *)

Please visit the official Wolfram Language Reference for more details.

On this page