public static Map<String, Pattern> parseMatchingPatterns(List<String> patterns) {
        if (patterns == null || patterns.isEmpty()) {
            return Collections.emptyMap();
        }

        Map<String, Pattern> patternsMap = new HashMap<>();
        patterns.forEach(pattern -> {
            String[] nameValuePair = pattern.split("=");
            if (nameValuePair.length != 2) {
                throw new InvalidConfigurationException("Illegal client matching pattern: " + pattern);
            }

            String param = nameValuePair[0].trim();
            if (!isValidParam(param)) {
                throw new InvalidConfigurationException("Illegal client matching pattern: " + pattern);
            }

            try {
                Pattern patternValue = Pattern.compile(nameValuePair[1].trim());
                patternsMap.put(param, patternValue);
            } catch (PatternSyntaxException e) {
                throw new InvalidConfigurationException("Illegal client matching pattern: " + pattern);
            }
        });

        return patternsMap;
    }
Parses the client matching patterns and builds a map with entries that has
(PatternName, PatternValue) as the entries.
Ex: "VERSION=1.2.3" would be converted to a map entry of (Version, 1.2.3)
<p>
NOTES:
Client match pattern splits the input into two parts separated by first occurrence of the character '='

@param patterns List of client matching pattern strings
@return map of client matching pattern entries
server/src/main/java/org/apache/kafka/server/metrics/ClientMetricsConfigs.java