0

I have a text with has nested parenthesis in it. I need to process the test from inner most parenthesis, apply some logic and then move 1 level up and repeat the processing. Is there any way we can access the string within each of the paranthesis in the order of their depth.

E.g :

( xy ( ef (ab) (cd) gh ) ,  ( mn  (op) (qr), st ) z )

Expected procesing should first process :

(ab) (cd) (op) (qr)

Next:

( ef (ab) (cd) gh ) and ( mn  (op) (qr), st ) 

and lastly

( xy ( ef (ab) (cd) gh ) ,  ( mn  (op) (qr), st ) z )
yatu
  • 86,083
  • 12
  • 84
  • 139

0 Answers0