You have to account for the nesting of parens, something like: ((())) Sent from my iPad
On Jul 26, 2013, at 8:17 AM, "Peter M. Brigham" <pmb...@gmail.com> wrote: > If you want a more general solution, you could use offsets(a,str) along with > offsets(b,str) and look at all the pairs, with item i of offsets(b,str) being > index of the closing paren for the open paren at item i of offsets(a,str). > Presuming that there are no unmatched parens in str, the latter should be > greater than the former for each i. _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode