Suppose I have a nested list such as,
{{{A, B}, {A, D}}, {{C, D}, {A, A}, {H, A}}, {{A, H}}}
Where the elements of interest are,
{{A, B}, {A, D}} {{C, D}, {A, A}, {H, A}} {{A, H}}
How would I use select to pick up only elements that contain two or more A
s in the first part of their sub-elements. In this example I would want the following as an output,
{{A,B},{A,D}}
Cases[{{{A, B}, {A, D}}, {{C, D}, {A, A}, {H, A}}, {{A, H}}}, {___, {A, _}, ___, {A, _}, ___}]
$\endgroup$