I have expressions like
and I want to replace
tc by something else, but only if it occurs inside
Cos, i.e. the outer
tc should remain as is. Is there any way of specifying the context in which
Replace should act? Maybe some clever pattern tricks?
Note that the actual expressions I'm working on are more complicated and consist of more (similar) terms, so just skipping over the first occurrence isn't going to cut it.