private List<String> getWords(String s) { String[] words = Regex.Split(s, @"\W"); var wordlist = new List<string>(); foreach (var word in words) { if (!String.IsNullOrEmpty(word)) { wordlist.Add(word); } } return wordlist; }