I have been struggling to find the solution for below requirement
Input string is Sum(Spec("any text1" : "any text2"),spec("any text3" : "any text4")) I want to match the string spec("any text1" : "any text2") and spec("any text3" : "any text4"))
pattern which I tried is Spec\(([^)]*)\)

This pattern works for above input , but if any of the any text1 ,any text2, any text3 and any text4 contains parenthesis then it fails to match
ex input Sum(Spec("any text1 with (bracket)" : "any text2"),spec("any text3" : "any text4"))
It is also possible that text can contain the quotation marks as well "chassis \"4\"".
