I have an algebraic expression
(l[d,1]/(-l[d,1]+m[dd,1] p[dd]+m[du,1] p[du])+l[d,2]/(-l[d,2]+m[dd,2] p[dd]+m[ud,2] p[ud])+l[u,1]/(-l[u,1]+m[uu,1] p[uu])+l[u,2]/(-l[u,2]+m[uu,2] p[uu]))/(l[d,1]+l[d,2]+l[u,1]+l[u,2])
and I want to get a list of all the variables that are present in it excluding the mathematical operators , e.g.,
{l[d,1], m[dd,1], p[dd], ...}.
That is, replace all the heads that are Plus, Power or Times by the head List, Flatten the resulting list and remove the duplicates. How do I do that?