Mathematica 9 is now available

ReplaceReplaceRepeated (//.)

ReplaceAll

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

FilledSmallSquare Example: x + 2 /. x -> a LongRightArrow.

FilledSmallSquareReplaceAll 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.

FilledSmallSquareReplaceAll applies a particular rule only once to an expression.

FilledSmallSquare Example: x /. x -> x + 1 LongRightArrow.

FilledSmallSquare See the notes on Replace for a description of how rules are applied to each part of expr.

FilledSmallSquareexpr /. rules returns expr if none of the rules apply.

FilledSmallSquare See The Mathematica Book: Section 2.4.1.

FilledSmallSquare See also: Rule, Set, MapAll, ReplaceRepeated, TransformationFunctions.

Further Examples

ReplaceReplaceRepeated (//.)



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.