Error "ORA-12726:unmatched bracket in regular expression" while trying to separate a part of a string from other part
The error is because [ and ] are part of regex syntax, which makes handling them in a regex tricky as you have to escape them, e.g. 'sum:\[\]+,'
I found it easier to replace them on the fly with { and } before applying regexp_substr to the result:
with demo (str) as
      ( select 'sum:{sum(x)&gt;1 and sum(y)&gt;2 and sum(z)&gt;3},where:{n=1 and m=2}'
        from dual )
select regexp_substr(translate(str,'[]','{}'),
         '(sum:{)([^{}]+)', 1, 1, 'i', 2) as sum_expr
     , regexp_substr(translate(str,'[]','{}'),
         '(where:{)([^{}]+)', 1, 1, '', 2) as where_expr
from   demo;

SUM_EXPR                            WHERE_EXPR
----------------------------------- -----------
sum(x)&gt;1 and sum(y)&gt;2 and sum(z)&gt;3  n=1 and m=2