Javascript Reg ex to match a text
<p>How do i check if a particular text exists in a word on its own or a part of a word?
I understand the code below but it work separately.Im looking for a single expression that will also return TRUE for tested,retest but False for test0123,123test. Any help much appreciated</p>

<pre><code>var string_1 = "test";
var string_2 = "retests";

/\btest\b/g.test(string_1);//TRUE

/\Btest\B/g.test(string_2);//TRUE
</code></pre>
