@Test void extractValidVariableName() { assertEquals("var", extractVariableName("${var}")); assertEquals("var.subvar", extractVariableName("${var.subvar}")); }
public static String extractVariableName(String expression) { if (isEmpty(expression)) { return null; } Matcher matcher = regexPattern.matcher(expression); if (matcher.matches()) { return matcher.group(1); } return null; }
VariableUtils { public static String extractVariableName(String expression) { if (isEmpty(expression)) { return null; } Matcher matcher = regexPattern.matcher(expression); if (matcher.matches()) { return matcher.group(1); } return null; } }
VariableUtils { public static String extractVariableName(String expression) { if (isEmpty(expression)) { return null; } Matcher matcher = regexPattern.matcher(expression); if (matcher.matches()) { return matcher.group(1); } return null; } private  VariableUtils(); }
VariableUtils { public static String extractVariableName(String expression) { if (isEmpty(expression)) { return null; } Matcher matcher = regexPattern.matcher(expression); if (matcher.matches()) { return matcher.group(1); } return null; } private  VariableUtils(); static String extractVariableName(String expression); }
VariableUtils { public static String extractVariableName(String expression) { if (isEmpty(expression)) { return null; } Matcher matcher = regexPattern.matcher(expression); if (matcher.matches()) { return matcher.group(1); } return null; } private  VariableUtils(); static String extractVariableName(String expression);  }