except

operator

Purpose

except is an operator that allows characters to be removed from a character class, thereby defining a new (smaller) character class. For example, whereas digit is a character class that will match one of the digits 0 through 9,

  [digit except "0"]
is a new character class that will match one of the digits 1 through 9, but not the digit 0.

except can also be written using a backslash: [digit \ "0"].