match nested parenthesis

s99999999s2003 at yahoo.com s99999999s2003 at yahoo.com
Tue Jan 23 04:03:01 CET 2007


hi
i wish to find an reg exp for matching nested parenthesis of varying
level like
string =
"somewords1(words(somewords2)-(some(some)words3)somestuff)somestuff"
and be able to evaluate the pair starting from the inner most(the
deepest level) , ie (some)
up till the outer most. What is a good reg exp to do this? or is simple
string manipulations enough? 
thanks




More information about the Python-list mailing list