How can I extract all the non-number symbols from an expression [duplicate]

If I have an expression, let us say something like this:

Cos[3 x] + π/cofe Exp[y^(c  z)]


how can I get all non-number symbols in the expression which are:

{x, cofe, y, c, z}


I tried this:

Cases[Cos[3 x] + π/cofe Exp[y^(c  z)], _Symbol]


but it didn't work.

marked as duplicate by Mr.Wizard♦Jun 6 '14 at 1:10

expr = Cos[3 x] + \[Pi]/cofe Exp[y^(c z)];

• This is a nice answer and I am puzzled there is no built-in for this sort of thing but Variables (for polynomial expressions) is the closest there is. (+1) – gpap Jun 5 '14 at 7:33
• An alternative: Cases[expr, Except[_?NumericQ, _Symbol], ∞] // Union – m_goldberg Jun 6 '14 at 0:53