This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Documentation / Mathematica / Built-in Functions / Programming / Pattern Matching /

Further Examples: Alternatives (|)

The rule replaces either a or b and nothing else.

In[1]:=

Out[1]=

The defined function ff takes the logarithm of expressions whose heads are Integer, Rational or Plus.

In[2]:=

In[3]:=

Out[3]=

In[4]:=