I am learning regex for a project. Trying to find a regex that will capture (([[X]]+2)) in "\[format((([[X]]+2)),"#####0.######")]". Code that I am trying is here:
Pattern patternFormat1 = Pattern.compile("\\[format\\(^(.+?),");
String min = "\\[format((([[X]]+2)),\"#####0.######\")]";
Matcher matcherMin = patternFormat1.matcher(min);
if(matcherMin.find())
System.out.println(matcherMin.group(1));