# Expanding the powers of algebraic expression

Suppose we have an expression like $b^m-2 b^{1+m}+4 b^{-2+2m}$. Now is it possible to expand the powers to get $b^m-2b b^m+4 b^{-2} b^{2m}$? Indeed, I want to replace $b^m$ with another expression, and Mathematica cannot recognize it in e.g. $b^{1+m}$.

More generally, is there a way to replace $b^{f(m)}$ with $b^{f(1)}$ where $f(m)$ is an arbitrary function of $m$?

ex = b^m - 2 b^(1 + m) + 4*b^(-2 + 2*m)