today I was wondering if there is a better solution perform the following code sample.
string keyword = \" abc, foo , bar\";
string match = \"foo\";
str
I know this is 10 years too late but you could have just split by ' ' as well:
string[] split= keyword.Split(new char[] { ',', ';', ' ' }, StringSplitOptions.RemoveEmptyEntries);
Because you're also splitting by the space char AND instructing the split to remove the empty entries, you'll have what you need.