If you need exactly two words, how about something like this: set the wholeMatches to true get wordOffset(word1, tText) if (it > 0) AND (it = (wordOffset(word2, tText) - 1)) then ... end if It seems wordOffset() will ignore multiple spaces for you. HTH, Brian