Matchtext for multiple words
mark at maseurope.net
Thu Nov 30 10:52:53 EST 2006
Another go. Assumes the wordList to be a comma separated list.
function wordMatch wordList, pText
put "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" & space
& tab & cr into tGoodChars
repeat for each char c in pText
if c is in tGoodChars then put c after tText
repeat for each item i in wordList
if i is not among the words of tText then return false
It seems a bit brutish, but it's reasonably quick, and it won't find
"tent" in "content" and will find "yikes" in "(yikes!)".
More information about the Use-livecode