On second thought :
function offsetPair a,b,str -- str cannot be more than one line -- returns first instance of char a && "matching" instance of char b in str, or 0 if no a or empty if no match put offset(a,str) into ca if ca = 0 then return 0 put numToChar(7) into char 1 to ca of str set lineDelimiter to a set itemDelimiter to b repeat with i = 1 to the number of items in str if i = the number of lines in item 1 to i of str then return ca && ca+length(item 1 to i of str) end repeat return empty end offsetPair _______________________________________________ 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