I'm trying to figure out how to match "word" but not "word1", "w1ord" or any variation of "word!" where "!" could be anything "#%!"
Basically I want to match against word that only uses A-Z and a-z. The following does not work :/
bool notOnlyLetters = yourStringValue.ToArray().Any(x => !(x >= 65 && x <= 122));
You can do it with linq
EDIT: After second correct edit of Wiktor.
bool notOnlyLetters = yourStringValue.ToUpper().ToArray().Any(x => !(x >= 65 && x <= 90));