I have been trying to replace multiples of one thing in an expression, for example:
(E^(4 s - 2 z) + E^(8 s - 4 z) + E^(12 s - 6 z)) //. {(4 s - 2 z) -> meow}
However, I end up with the output of E^meow + E^(12 s - 6 z) + E^(8 s - 4 z), where as I would like it to be E^meow + E^(2 meow) + E^(3 meow) instead.
Also I would like to replace the following (g_1 + g_2 + g_3 + g_4) /. {g_1 -> h1, g_2 -> h2}. However, I would like it be a pattern for so it replaces all g_# to h# instead.
Note: by g_# I mean a subscript #
Any help would be greatly appreciated. I am sorry I cannot really give much more info, as I dont really know much about mathematica.