ReplaceAll[expr, rule]
and ReplaceRepeated[expr, rule]
search through all subexpressions of expr
applying rule
where they match.
Are there built-in Mathematica functions that do the same thing, except not make any replacements inside specified Head
s (that is, it shouldn't look at any subexpressions within specified Head
)?
I'd imagine something like ReplaceAllRestricted[expr, rule, heads]
and ReplaceRepeatedRestricted[expr, rule, heads]
.
Developer`ReplaceAllUnheld
$\endgroup$