Looking for a bit of guidance on how to detect separated words in a sorted list in c#.
I've looked into a few options using regular expressions but not having much success.
Say I have the following sorted ArrayList of words:
I want to be able to detect the words 'best word' and 'two-words' apart from the rest. Is there any other way besides maybe regular expressions to do this? Something more efficient. Also some guidance on what regular expression to use will be very helpful.
Regex compoundsWords = new Regex(@"\W+", RegexOptions.IgnoreCase);
Match cad = compoundsWords.Match(words.ToString());