# Deleting elements of a list based on specific character

Suppose I have the following list :

l={{a, b, d}, {a, v}, {b, c, d}}


I want to delete those elements that contain the letter a such that I get:

Output: {{b, c, d}}


I tried DeleteCases command but it does not work. What I we want two letters such as "a" and "c" In that case the output shall be empty. How one handles this?

• Also consider Select[l, FreeQ[a]] and Select[l, FreeQ[#, c] && MemberQ[#, v] &] ? – user1066 Jul 26 '18 at 21:22

## 1 Answer

Pick[l, FreeQ[a]  /@ l]


{{b, c, d}}

• Thanks, what if you want do to it for two letters like a and b? (in this case we expect an empty list). In other words can FreeQ be over two letters instead of only one? – William Jul 26 '18 at 16:17
• @William Replace a by a|b – Coolwater Jul 26 '18 at 16:19
• Fabulous thanks – William Jul 26 '18 at 16:20