static void Main(string[] args)
{
List<string> sourceFromDB = new List<string>
{
"chennai, mumbai, pune"
,"chennai, mumbai"
,"chennai, bangalore"
,"bangalore, pune"
,"delhi, pune"
,"chennai"
,"mummbai"
,"chennai"
};
string text = "chennai,mummbai";
string[] allKey = (text ?? "").Split(new char[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries);
List<string> result = (from sc in sourceFromDB
let scTp = sc.Split(new char[]{',',' '},StringSplitOptions.RemoveEmptyEntries)
where scTp.Distinct().Intersect(allKey).Count() > 0
select sc).ToList();
foreach (string str in result)
{
Console.WriteLine(str);
}
Console.ReadKey();
}</string></string></string>