in reply to matching whole words only

Better Title?

try /^SWIM$/

update

I've been messaged that I misread your question, so I read it again and must admit you miswrote the question.

For me its not clear what you really want, hence I shouldn't have answered at all, sorry ;)

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)

PS: Je suis Charlie!

update

Original title was "Better Way?" and was corrected after consideration.