score:3

Accepted answer

For CSV splitting I advise you to use any CSV parser, not simply use string.Split method.

string[] input = { "1,2,4,5", "1,4,3,6", "2,3,4,5", "1,4" };

var result = input.Where(l => l.Split(',').Any(s => new[] { "2", "3" }.Contains(s)));

Related Articles