title: Highlight specific word which is not a part of another word using regex in javascript
body: <p>Let's consider a string named **str*, which is defined as : </p>
  
  <pre><code>let str = "I am looking for the forum";
  </code></pre>
  
  <p>And a function named <strong>highlight</strong> which can be used something as :</p>
  
  <pre><code>let f = highlight(str);
  console.log(f); 
  // Expected Result : I am looking &lt;b&gt;for&lt;/b&gt; the forum.
  </code></pre>
  
  <p>I tried to make the function with regex. My try :</p>
  
  <pre><code>const highlight = (val) =&gt; {
   return val = val.replace(/for/gim, "&lt;b&gt;for&lt;/b&gt;");
  };
  </code></pre>
  
  <p>But the output was :</p>
  
  <pre><code>I am looking &lt;b&gt;for&lt;/b&gt; the &lt;b&gt;for&lt;/b&gt;um
  </code></pre>
  
  <p>So, how can I solve it ?</p>