title: Search for a whole word in a string
body: <p>I am looking for a function written in JavaScript (not in <a href="https://en.wikipedia.org/wiki/JQuery" rel="nofollow noreferrer">jQuery</a>) which will return true if the given word exactly matches (should not be case sensitive).</p>
  <p>Like...</p>
  <pre><code>var searchOnstring = &quot; Hi, how are doing?&quot;
  
     if( searchText == 'ho'){
       // Output: false
     }
  
     if( searchText == 'How'){
       // Output: true
     }
  </code></pre>