This question might have been asked before, but I couldn't find this particular version of the problem.
I want to match everything inside parentheses, which is easy in itself. But my problem is that the text inside of the parentheses can have nested parentheses and text strings containing parentheses!
Look at this example : \((.*)\)
('1KtxNawkosV1H5jzUzW_$1'),#38,'2ndLevel', '2a',#251524,#251773,#328411,.PHYSICAL.,.EXTERNAL.
'1KtxNawkosV1H5jzUzW_$1',#38,'2ndLevel', '2a',#251524,#251773,(#328411,.PHYSICAL.,.EXTERNAL.)
('1KtxNawkos(asd)V1H5jzU)zW_$1', ('asd', #23331), #21)<-- ###should end here###,#38,'2ndLevel', '2a',#251524,#251773,#328411,.PHYSIaCAL.,.EXTERNAL., ')'
#38,'2ndLevel',('1KtxNawkos(asd)V1H5jzU)zW_$1') '2a',#251524,#251773,#328411,.PHYSICAL.,.EXTERNAL.
It's almost doing what I need, but it fails in the 3rd example.
It should basically omit parentheses inside (in this case, single) quotes and find the outer most matching parentheses.
What do I need to change in order to make it work?
Thanks!