You don't need regex for that, you can do:
if ($gettok(string,3,32) == %word)
Doing it with regex would actually be more complex if the word you want to check is dynamic, like the %word variable you mentioned, because you'd have to escape any regex special characters that might be in %word or use $+(\Q,$replacecs(%word,\E,\E\\E\Q),\E) instead of %word in the pattern.