Late to the thread.

If the purpose is just to see whether the word exists in a string, would this 
work (using regular expressions)?

on mouseUp
   put "Some timely text with time, and more." into tString
   put "time" into tTarget
   put containsWord(tTarget, tString) 
end mouseUp

function containsWord tWord, tString
   put "(?i)\b" & tWord & "\b" into tRE
   return matchText(tString, tRE)
end containsWord

"\b" is the regular expression "word boundary" pattern. 
"(?i)" makes the match case insensitive.

Cheers
Dave
_______________________________________________
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

Reply via email to