You want only uppercase words from a string, huh?
Maybe something like this?
var upperCaseWords = from w in Regex.Split(text, @"\s+")
where char.IsUpper(w[0])
select w;
If you need words that are in all uppercase letters (for example, IT), you can use basically the same approach, only with a different predicate:
var upperCaseWords = from w in Regex.Split(text, @"\s+")
where w.All(c => char.IsUpper(c))
select w;
source
share