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
end repeat
repeat for each item i in wordList
if i is not among the words of tText then return false
end repeat
return true
end wordMatch
It seems a bit brutish, but it's reasonably quick, and it won't find
"tent" in "content" and will find "yikes" in "(yikes!)".
Best,
Mark
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution