title: Javascript/Jquery: replace string pattern with link
body: <p>I have a table on a page, where there are text entries, and have one or more &quot;hashtags&quot;, which I want to identify via JavaScript/JQuery and replace them with a link.</p>
  <p>Currently I am using the following regex selector for hashtags: <code>/#([a-zA-Z0-9]+)/g</code></p>
  <p>I have been experimenting with <code>replaceWith</code> and <code>replace</code> methods of JQuery, but I couldn't achieve the desired result yet.</p>
  <p>Example entries on the page:</p>
  <pre><code>&lt;td class=&quot;entry&quot;&gt;Had meeting with client #Project1&lt;/td&gt;
  </code></pre>
  <p>This is my desired output (after manipulating via JavaScript/JQuery):</p>
  <pre><code>`&lt;td class=&quot;entry&quot;&gt;Had meeting with client &lt;a href=&quot;search.php?`query=#Project1&quot;&gt;#Project1&lt;/a&gt;&lt;/td&gt;
  </code></pre>
  <p>Does someone help out with a function/for this?  As my code is not close to working I am I choosing not to post the code..</p>