Replace only whole word in javascript
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3080037/match-and-replace-whole-words-in-javascript">Match and replace whole words in javascript</a>  </p>
</blockquote>



<p>I want to replace in JavaScript the word "microsoft" with "stackoverflow".</p>

<p>But I only want it to replace the whole word - so I don't want "microsoft microsftttt" to be turned into "stackoverflow stackoverflowttt".</p>
