Skip to main content
3 of 3
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/

The best method I am aware of to handle this kind of problem is to filter by context.(1)

SetAttributes[user, HoldFirst] user[s_Symbol] := Context@Unevaluated@s =!= "System`"; a[x, y]/(b[x, y] c[x, y]) /. f_?user[x1_, y1_] :> f[2 x1, 3 y1] 
a[2 x, 3 y]/(b[2 x, 3 y] c[2 x, 3 y]) 

One could include other contexts in the exclusion besides System, or use the inverse and test only for user symbols existing in the "Global`" context. Without additional examples my example is as specific as I can make it.


Regarding the unusual evaluation of the ? operator (PatternTest) please see:

Mr.Wizard
  • 275.2k
  • 34
  • 606
  • 1.5k