I have two lists:
lst1 = {a,b,c,d,b,e,c}
and:
lst2 = {b,c}
I am interested in removing all occurrences of lst2 from lst1, producing:
res = {a,d,b,e,c}
This is not exactly the same as Removing elements from a list which appear in another list; thank you for any thoughts.
lst1 //. {start___, Sequence @@ lst2, end___} :> {start, end}– Bob Hanlon Oct 17 '16 at 00:47