Mathematica > Core Language > Rules & Patterns > Patterns > Alternatives (|) >

Alternatives


is a pattern object which represents any of the patterns .
  • If a named pattern such as appears in that are not used in a particular match, then the named pattern is taken to have a value that is a zero-length sequence Sequence.
Replace instances of either or :
Replace instances of either or :
In[1]:=
Click for copyable input
Out[1]=
Pick out integers or reals:
New in 2
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF