whole word match in javascript
<p>I am using javascript in my webpage. I am trying to search a single whole word through textbox. Say I search: 'me' , I should find all the 'me' in the text, but not find 'memmm' per say.</p>

<p>I am using javascript's search('my regex expression') to perform the current search (with no success).</p>

<p>Thank you!</p>

<p>Edit: After several proposals to use the \b switches [which don't seem to work] I am posting a revised explanation of my problem:</p>

<p>amm, from some reason this doesn't seemt to do the tricks. Assume the following javascript search text:</p>

<pre><code>&lt;script type='text/javascript'&gt;
var lookup = '\n\n\n\n\n\n2    PC Games        \n\n\n\n';
lookup  = lookup.trim() ;
alert(lookup );
                var tttt = 'tttt';
                alert((/\b(lookup)\b/g).test(2));

&lt;/script&gt;
</code></pre>

<p>Moving lines is essential</p>
