IgnoringInactive

IgnoringInactive[patt]

is a pattern object that, for purposes of pattern matching, ignores occurrences of Inactive in both patt and the expression being matched.

Examples

open allclose all

Basic Examples  (1)

Replace all elements in a list that match a certain pattern:

Use IgnoringInactive to include a particular Inactive pattern:

Scope  (3)

By default, inactive symbols are excluded during pattern matching:

Use IgnoringInactive to include a particular Inactive pattern:

Find whether an expression matches a certain pattern:

Include a particular Inactive pattern:

Find whether an expression is free of a certain pattern:

Include a particular Inactive pattern:

Applications  (2)

Define a rule that applies to both active and Inactive objects:

The rule also works for an inactive int:

Define a multiplication rule for the logarithm:

The rule works for both active and inactive versions:

Introduced in 2014
 (10.0)