NoneMatch

NoneMatch[{e1,e2,},form]

yields True if ei does not match the pattern form for any of the ei.

NoneMatch[expr,form,level]

tests parts of expr at level level.

NoneMatch[form]

represents an operator form of NoneMatch that can be applied to an expression.

Details

Examples

open allclose all

Basic Examples  (4)

Check if no element of a list satisfies a condition:

Check if no element of a matrix satisfies a condition:

Use the operator form of NoneMatch:

Check if all values of an association match a pattern:

Scope  (4)

NoneMatch may be applied to expressions with any head:

NoneMatch can operate on ragged expressions:

By default, NoneMatch operates at level 1:

Use Verbatim to test for a literal blank:

Properties & Relations  (6)

NoneMatch[list,form] is equivalent to AllMatch[list,Except[form]]:

NoneMatch[list,form] works efficiently on sparse vectors:

NoneMatch[list,form] checks the parts of list in order, stopping as soon as form matches:

NoneMatch[list,form] is equivalent to NoneTrue[list,MatchQ[form]]:

NoneMatch[{e1,e2,},form] is equivalent to Nor[MatchQ[e1,form],MatchQ[e2,form],]:

NoneMatch[list,e1|e2,] is equivalent to ContainsNone[list,{e1,e2,}]:

Possible Issues  (1)

For associations, NoneMatch tests only values:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_nonematch, author="Wolfram Research", title="{NoneMatch}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/NoneMatch.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_nonematch, organization={Wolfram Research}, title={NoneMatch}, year={2024}, url={https://reference.wolfram.com/language/ref/NoneMatch.html}, note=[Accessed: 21-November-2024 ]}