Find all element of array contained in a string

String = " This is great wonderful delicious food to eat"
Array={“great”,“eat”}

The array content will be checked in the string and should return - great,eat.

I have used (from x in array_input where x.Contains(“string_to_check”) select array.IndexOf(array_input ,x)).FirstOrDefault.tostring

But this returns the first element of array and the index.

@sampaddas
Give a try on
(From x in arrayStringsToCheckVariable
Where strsentencevariable.contains(x)
Select x).ToList

Return IS a String list with These Strings from Array that are Contained in the sentence string

Please modify the varnanes from Sample according to your definitions

@sampaddas Check this ;
(from x in Array From y in yourString.Split() where x.ToString.ToLower.Trim.Equals(y.ToString.Trim.ToLower) select x).ToArray

Assign this Statement to a Array of Strings variable

Thanks a lot ! :+1: