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