This does what you want:
Cases[l^4*a[b][l] + l*a[c][l],a[y_][_]->y, {0, Infinity}]
Steve Luttrell
"Maximilian Ulbrich" <mulbrich at berkeley.edu> wrote in message
news:cv6sop$6pj$1 at smc.vnet.net...
> Hi,
>
> I would like to find subexpressions using Cases.
> In the following case, I expected to find a[b] and a[c] and therefore
> get {b,c} as the result. However, I get {l,l}.
> What happens and how can I solve this?
>
> Cases[l^4*a[b][l] + l*a[c][l], x_a[y_] -> y, {0, Infinity}]
>
> Thanks,
> Max
>