On Mon, Jul 29, 2013 at 6:57 PM, <dfepst...@comcast.net> wrote: > I may not have correctly implemented Peter Haworth's Regex string, but I > get wrong answers from writing the function as below -- > offsetPair6("(a(a))") returns "2 5".
Hi David, The regex actually returns the string within the parens so to get the char position of the parens, the function should return tStart-1 and tEnd+1 which would be 1 and 6 in your example, which I think is what you want? Glad your function works though, you should probably go with it if it feels more comfortable. Your situation was a challenge for me to find a way to do it with a regex :-) Pete lcSQL Software <http://www.lcsql.com> _______________________________________________ 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