> I wrote: > > Then there is also this repeat-less approach using arrays and filter:
> function findWordOffsets pText, pSearchTerm > put replaceText(pText,"\W+"," ") into pText > split pText by space > combine pText with cr and tab > filter pText with "*" & tab & pSearchTerm > sort numeric pText > return pText > end findWordOffsets This just doesn’t work in all cases because splitting by space does not assure one is splitting by true words. :( Sorry about that. Jim Lambert _______________________________________________ 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