Variables

Attributes[Variables] := {Protected}

Simple examples

In[1]:= Variables[x + y + y^2]
Out[1]= {x, y}
In[2]:= Variables[w^w + x^y + z]
Out[2]= {w^w, x^y, z}
In[3]:= Variables[a^2*b^(2*c + 2*d)]
Out[3]= {a, b^c, b^d}