Re: regular expression for nested parentheses

2007-12-09 Thread John Machin
On Dec 10, 12:22 pm, MRAB <[EMAIL PROTECTED]> wrote: > On Dec 9, 10:12 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > > > > > On Dec 10, 8:53 am, Noah Hoffman <[EMAIL PROTECTED]> wrote: > > > > On Dec 9, 1:41 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > > > A pattern that can validly be descr

Re: regular expression for nested parentheses

2007-12-09 Thread MRAB
On Dec 9, 10:12 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Dec 10, 8:53 am, Noah Hoffman <[EMAIL PROTECTED]> wrote: > > > > > On Dec 9, 1:41 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > > A pattern that can validly be described as a "regular expression" > > > cannot count and thus can't ma

Re: regular expression for nested parentheses

2007-12-09 Thread John Machin
On Dec 10, 8:53 am, Noah Hoffman <[EMAIL PROTECTED]> wrote: > On Dec 9, 1:41 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > A pattern that can validly be described as a "regular expression" > > cannot count and thus can't match balanced parentheses. Some "RE" > > engines provide a method of taggi

Re: regular expression for nested parentheses

2007-12-09 Thread Noah Hoffman
On Dec 9, 1:41 pm, John Machin <[EMAIL PROTECTED]> wrote: > A pattern that can validly be described as a "regular expression" > cannot count and thus can't match balanced parentheses. Some "RE" > engines provide a method of tagging a sub-pattern so that a match must > include balanced () (or [] or

Re: regular expression for nested parentheses

2007-12-09 Thread John Machin
On Dec 10, 8:13 am, Noah Hoffman <[EMAIL PROTECTED]> wrote: > I have been trying to write a regular expression that identifies a > block of text enclosed by (potentially nested) parentheses. I've found > solutions using other regular expression engines (for example, my text > editor, BBEdit, which