bool optionMatches(String key, Pattern pattern) { var val = optionAsString(key); if (val == null) return false; return _matches(pattern, val); }