This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.

# DeleteCases

 DeleteCases[expr, pattern]removes all elements of expr which match pattern. DeleteCases[expr, pattern, levelspec]removes all parts of expr on levels specified by levelspec which match pattern. DeleteCases[expr, pattern, levelspec, n]removes the first n parts of expr which match pattern.
• With the option , you can delete heads with DeleteCases. Deleting the head of a particular element in an expression is equivalent to applying FlattenAt to the expression at that point.
 n levels 1 through n Infinity levels 1 through Infinity {n} level n only {n1,n2} levels n1 through n2
• The default value for levelspec in DeleteCases is {1}.
• A positive level n consists of all parts of expr specified by n indices.
• A negative level -n consists of all parts of expr with depth n.
• Level -1 consists of numbers, symbols and other objects that do not have subparts.
• Level 0 corresponds to the whole expression.
• DeleteCases traverses the parts of expr in a depth-first order, with leaves visited before roots.
Delete cases that match integers:
 Out[1]=
 Options   (1)