Re: match nested parenthesis

2007-01-25 Thread arn . zart
[EMAIL PROTECTED] wrote: > 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

Re: match nested parenthesis

2007-01-23 Thread Neil Cerutti
On 2007-01-23, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > hi > i wish to find an reg exp for matching nested parenthesis of > varying level like > string = It is not possible, because the set of strings containing balanced parenthesis is not regular. Python re's aren't *really* regular express

Re: match nested parenthesis

2007-01-22 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | 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(th