Finding matched parentheses

Peter Haworth pete at lcsql.com
Mon Jul 29 13:14:43 EDT 2013


On Mon, Jul 29, 2013 at 9:07 AM, <dunbarx at aol.com> wrote:

> I tired your script on the string:
>
>
>
> aa(ss)(xx)(yy)
>
>
>
> it only returned the parens bracketing "ss"
>

I Think that's what he wants to do - just find the position of the first
set of parentheses, taking nested parens into account.  But not sure.....

Personally, I'd use the regex that Thierry posted a couple of days back.
 No recursion involved and one line of code does the job.

Pete
lcSQL Software <http://www.lcsql.com>



More information about the use-livecode mailing list