public Config regexSubset(String regex) {
    Map<String, String> out = new HashMap<>();
    Pattern pattern = Pattern.compile(regex);

    for (Entry<String, String> entry : entrySet()) {
      String k = entry.getKey();
      Matcher matcher = pattern.matcher(k);
      if (matcher.find()) {
        out.put(k, entry.getValue());
      }
    }

    return new MapConfig(out);
  }
Store and retrieve named, typed values as configuration for classes implementing this interface.
samza-api/src/main/java/org/apache/samza/config/Config.java