Welcome to regular expressions: http://www.regular-expressions.info/wordboundaries.html

Code:
//tokenize 32 this is a test | echo -ag $regex($1-,/\btest\b/iS)