Question: How to get a list of power of differential function expression

Giving a expression as follows, how to extract  powers of g to a list?

 In this example the list of powers of g is {2,1,2}

6*F*u[0, x]*g[x, x]*g^2+24*F*u[0]*g[x]^3-18*F*u[0]*g[x]*g[x, x]*g+2*F*u[0]*g[x, x, x]*g^2

Please Wait...