Alternatives

alt1 | alt2 | ... matches an expression if it matches any pattern in the list of alternatives.

Attributes[Alternatives] := {Protected}

Simple examples

In[1]:= Alternatives[c, d]
Out[1]= Alternatives[c, d]
In[2]:= MatchQ[b, Alternatives[c, d]]
Out[2]= False
In[3]:= MatchQ[c, Alternatives[c, d]]
Out[3]= True
In[4]:= MatchQ[d, Alternatives[c, d]]
Out[4]= True
In[5]:= Cases[{a, b, c, 1, 2}, Alternatives[c, _Integer]]
Out[5]= {c, 1, 2}
In[6]:= ({a, b, c, 1., 2}) /. ((Alternatives[amatch_Symbol, amatch_Integer] -> amatch + 1))
Out[6]= 1 + List[1 + a, 1 + b, 1 + c, 1., 3]
In[7]:= Cases[{a, b, c, d, e, f}, Alternatives[b, c, d, e]]
Out[7]= {b, c, d, e}
In[8]:= MatchQ[{a, b}, {a_, Alternatives[k, a_]}]
Out[8]= False