Hi all, thanks for the replies so far.
The problem with both matchChunk and offset are, that they will return the first occurance of the literal. So in a text like this: orange banana tomato banana tomato orange tomato banana orange on mouseUp local temp,tChar put fld 1 into temp put offset(char 1 of word 2 of line 3 of temp,temp) into tChar set the backcolor of char tChar of fld 1 to "red" end mouseUp Will hilite the first b instead of the one on line 3. @Mark: charIndex does not appear to be working on the templateField. And of course it is slower in 7… :-( All the best, Malte _______________________________________________ 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