See the above updated code. It would strip now the colors from the incomming query so it could check the words. Also I changed '&&' to '||' which means 'or'.
You could also add a phrase using a wildcard & iswm like '( *word*next*word* iswm $1- )'
The script would catch the line "that word in the line is next to that word..."
For more info, see
/help isin
/help iswm