ReplaceAll
ReplaceAll(expr, i -> new)
or
expr /. i -> new
replaces all
i
inexpr
withnew
.
ReplaceAll(expr, {i1 -> new1, i2 -> new2, ... } )
or
expr /. {i1 -> new1, i2 -> new2, ... }
replaces all
i
s inexpr
withnew
s.
Examples
>> f(a) + f(b) /. f(x_) -> x^2a^2+b^2
Related terms
Dispatch, Replace, ReplaceList, ReplacePart, ReplaceRepeated
Implementation status
- ✅ - full supported