javascript string replacement
<p>hey guys just a quick one for tonight.</p>

<p>i just want to change a smiley face e.g :-P to a html code like <code>&lt;span class=surp&gt;&lt;/span&gt;</code>
but it comes out with a error which is <br /> <code>Uncaught SyntaxError: Invalid regular expression: /:-(/: Unterminated group</code></p>

<p><br /></p>

<p>this is part of my code</p>

<pre><code>newmessage = newmessage.replace(/:-(/gi, "&lt;span class=sad&gt;&lt;/span&gt;");
</code></pre>

<p>i figured it out and it doesn't like the bracket so is there any other way to do this with the bracket?</p>
