JavaScript regex: add strings (preceding & following) to the matched string : <p>Say I have the following string in JavaScript:</p>

<pre><code>var text = "This is Table1, and the next table is Table2"
</code></pre>

<p>I need to highlight the <code>Table1</code> and <code>Table2</code> bold in HTML by adding <code>&lt;b&gt;&lt;/b&gt;</code>, e.g. <code>&lt;b&gt;Table1&lt;/b&gt;</code>. Making it even more difficult is the word preceding/following <code>Table1 or 2</code> varies.</p>

<pre><code>text.replace(/Table\d+/g, "&lt;b&gt;Table&lt;/b&gt;"); // how to reserve the number for Table1 or Table2 here?
</code></pre>

<p>Thanks</p>
