I shouldn’t, but check this out:
Matcher m = Pattern.compile(test.replace("{", "\\{(").replace("}", ")\\}")).matcher(test);
m.find();
for (int i = 1; i <= m.groupCount(); i++) {
System.out.println(m.group(i));
}
1
solved Reading data within parenthesis