This regex "((?:[^()]|.((?R)))+)" is working on Regex101 site but it raises a sintaxException with JAVA matcher.
Error:
Caused by: java.util.regex.PatternSyntaxException: Unknown inline modifier near index 14 \((?:[^()]|((?R)))+\)
The "R" seens not accepted by java regex engine. Unfortunately this seems to be the only way to get the match I need:
Assuming this is the source string I have to parse:
my params ( string(80), string(30), string(10) ) as ...
I need to get the content between the first "(" and the closing ")" (the last before as). This is just an example, and I have no other "hooks" except the "mathematical sequence" of opened and closed parenthesis. Any suggestion on how to solve this problem (in a way or another?) The regex is working on many regex testing sites, but not working using it in Java.