Given:
list1 = {{"a",1},{"b",2},{"c",3}}
I would like to delete any pair in list1 that does not have a first element that belongs to list2.
Example 1: If list2 = {"b"}, Output = {{"b",2}}
Example 2: If list2 = {"A","b"}, Output = {{"a",1},{"b",2}}
Here's what I have so far:
DeleteCases[list1,{#,_}/; !StringMatchQ[#,list2, IgnoreCase -> True]&].
I know this won't work (because StringMatchQ doesn't accept a list of values to compare to as a parameter, which leads me to thinking I need to Map the function above to list2.
