Replace(expr, lhs -> rhs)
replaces the left-hand-side pattern expression
lhs
inexpr
with the right-hand-siderhs
.
Replace(expr, {lhs1 -> rhs1, lhs2 -> rhs2, ... } )
replaces the left-hand-side patterns expression
lhsX
inexpr
with the right-hand-siderhsX
.
>> Replace(x, {{e->q, x -> a}, {x -> b}})
{a,b}
ReplaceAll, ReplaceList, ReplacePart, ReplaceRepeated
- ✅ - full supported