Use a StringSwitch<> instead of a manually constructed string matcher.