Skip to content

BlankNullSequence

___ matches any sequence of zero or more expressions.

___head matches any sequence of zero or more expressions, each with a Head of head.

Attributes[BlankNullSequence] := {Protected}

Simple examples

In[1]:= MatchQ[a*b, ___]
Out[1]= True
In[2]:= MatchQ[a + b, a + b + ___]
Out[2]= True

Further examples

With head assertions:

In[1]:= MatchQ[a + b + c, a + x___Symbol]
Out[1]= True
In[2]:= MatchQ[a + b + c, a + x___Plus]
Out[2]= False