Mathematica > Patterns >

Except

Except[c]
is a pattern object which represents any expression except one that matches c.
Except[c, p]
represents any expression that matches p but not c.
  • Except[c] represents the complement of the set of expressions that match c.
This gives all elements except 0:
In[1]:=
Click for copyable input
Out[1]=
 
Delete all nonvowel characters from a string:
In[1]:=
Click for copyable input
Out[1]=
New in 5.1
© 2008 Wolfram Research, Inc. japanese.gif
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team