[Solved] Reading data within parenthesis


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));
}

Ideone Demo

1

solved Reading data within parenthesis