character class

A regular expression or glob part in square brackets that matches any one character from a set, such as [abc] or [a-z].

In more detail

A caret just inside the bracket negates it, so [^abc] matches anything else. Named classes such as [[:space:]], [[:digit:]] and [[:lower:]] respect the language settings and are safer than ranges. tr uses the same names, as in tr '[:lower:]' '[:upper:]'.

Related terms

Taught in

References