is among the words AND find words
dave.cragg at lacscentre.co.uk
Thu Dec 22 04:17:12 EST 2011
Late to the thread.
If the purpose is just to see whether the word exists in a string, would this work (using regular expressions)?
put "Some timely text with time, and more." into tString
put "time" into tTarget
put containsWord(tTarget, tString)
function containsWord tWord, tString
put "(?i)\b" & tWord & "\b" into tRE
return matchText(tString, tRE)
"\b" is the regular expression "word boundary" pattern.
"(?i)" makes the match case insensitive.
More information about the Use-livecode