in reply to capturing matching parenthesis
No regex in my mind :-( I think your string is a kind of
tree with nodes, and your leaves are the most internal letters. It's not impossible a struct C-like and isolate every level of nodes and the leaves at the last level.
( a ( b ( c ) ( d ) e ) )
Graphically:
a
/ \
b e
/ \
c d
Excuse me for my english