Wolfram Language & System 10.4 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


applies a rule or list of rules in an attempt to transform each subpart of an expression expr.

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


  • ReplaceAll looks at each part of expr, tries all the rules on it, and then goes on to the next part of expr. The first rule that applies to a particular part is used; no further rules are tried on that part, or on any of its subparts.
  • ReplaceAll applies a particular rule only once to an expression.
  • returns expr if none of the rules apply.
  • ReplaceAll[rules][expr] is equivalent to ReplaceAll[expr,rules].
Introduced in 1988
| Updated in 2014