This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

ReplaceRepeated (//.)

expr//.rules
repeatedly performs replacements until expr no longer changes.
  • expr//.rules effectively applies /. repeatedly, until the results it gets no longer change.
  • It performs one complete pass over the expression using /., then carries out the next pass.
  • You should be very careful to avoid infinite loops when you use the //. operator. The command x//.x->x+1 will, for example, lead to an infinite loop.
Apply rules for the power and product laws for logarithms of real numbers recursively:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
ReplaceAll does just a single replacement:
In[3]:=
Click for copyable input
Out[3]=
New in 1