WLJS LogoWLJS Notebook

Verbatim

Verbatim[expr] represents expr in pattern matching, requiring that expr be matched exactly as it appears, with no substitutions for blanks or other transformations.

Examples

Match a literal pattern:

MatchQ[_, Verbatim[_]]
(* True *)

Without Verbatim, blank matches anything:

MatchQ[x, _]
(* True *)

Match a specific function form:

Cases[{f[_], g[x], f[y]}, Verbatim[f[_]]]
(* {f[_]} *)

Please visit the official Wolfram Language Reference for more details.

On this page