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.

Details

Examples

open allclose all

Basic Examples  (2)

This gives all elements except 0:

Delete all nonvowel characters from a string:

Scope  (2)

Except works with patterns and string patterns:

Constraints on patterns:

Applications  (3)

Get all non-integers:

Find words containing nonword characters:

Strip off all tags "<...>" from an HTML document:

Wolfram Research (2004), Except, Wolfram Language function, https://reference.wolfram.com/language/ref/Except.html.

Text

Wolfram Research (2004), Except, Wolfram Language function, https://reference.wolfram.com/language/ref/Except.html.

CMS

Wolfram Language. 2004. "Except." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Except.html.

APA

Wolfram Language. (2004). Except. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Except.html

BibTeX

@misc{reference.wolfram_2024_except, author="Wolfram Research", title="{Except}", year="2004", howpublished="\url{https://reference.wolfram.com/language/ref/Except.html}", note=[Accessed: 09-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_except, organization={Wolfram Research}, title={Except}, year={2004}, url={https://reference.wolfram.com/language/ref/Except.html}, note=[Accessed: 09-December-2024 ]}