Try:
new RegExp('\\b(word1|word2|word3)\\b','g');
\b
is a
word boundary[
^] so now your regex will only match full words.
To create this from an array with words:
var words = [ "word1", "word2", "word3" ];
var regex = new RegExp('\\b(' + words.join('|') + ')\\b', 'g');