private fun extractVariables(variablesBody: String): Map<String, String?>? { val map: Map<String, String> = HashMap() val m: Matcher = PATTERN_VARIABLES_BODY.matcher(variablesBody) LOG.debug("parsing variables body") while (m.find()) { val key: String = m.group(1) val value: String = m.group(2) if (map.containsKey(key)) { LOG.warn("A duplicate variable name found with name: {} and value: {}.", key, value) } map.put(key, value) } return map }
Extract variables map from variables body .