Testing for speed, I found that my July 29 function--the one that uses
lineDelimiter and itemDelimiter--is thwarted when two parens appear as
consecutive characters, and gives the wrong answer in that case. Sorry about
that.
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".
function offsetPair6 str
put "\((((?>[^()]+)|(?R))*)\)" into tRegex
get matchChunk(str,tRegex,tStart,tEnd)
return tStart && tEnd
end offsetPair6
As far as I know the function I posted July 26 works correctly.
David Epstein
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode