How to get a list of values which has special characters in it using lambda expression?
I have a list of text-items in an array named values and want the list of text-items containing special characters from it.
var specialCharacters = new string[] { ",", ":", "=" };
I tried couple of times and it didn't worked.
var ans = Array.FindAll(values, value => value.Split(specialCharacters, StringSplitOptions.None).Length > 0);
alternately I was tried
var ans2 = values.Where(value => (value.Split(specialCharacters, StringSplitOptions.None)).Length > 0).ToList();
Both expression didn't worked for me. Output is same as the array "values".