I have a string of type "sum(sum(_))" in which _ can be one or many(separated by commas) function call, string between quotes, etc.
//should return true
/sum\(sum\(_\)\)/.test('sum(sum(2,3,4))')
/sum\(sum\(_\)\)/.test('sum(sum(a,b,c))')
/sum\(sum\(_\)\)/.test('sum(sum(neg(2),neg(neg(3))))')
I can actually match the string and other parameters but there is complication when I try to match nested function calls.
Anyone knows how to do this with regex or some library in javascript made for dealing with this type of problem? Thanks in advance.