I have the following string
“test+IF(one,2,2)+Wow+IF(two,1,1)”
I need to get the following strings:
IF(one,2,2)
IF(two,1,1)
I tried the following regex but it only gives me the following with missing close parenthesis
Pattern pattern.compile(“IF(([^)]+))”);
Matcher matcher = pattern.match(formula);
While(matcehr.find()) {
System.out.println(matcher.group(0));
}
Result is
IF(one,2,2