Troubleshooting "preg_replace(): Unknown modifier"
<p>I am trying to implement an open source string-to-link converter, but i have an error and I frankly have tried everything and do not know what is wrong.  Here is the code:</p>

<pre><code>$chatmessage = preg_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_+.~#?&amp;//=]+)',
'&lt;a href="'.$chatmessage.'" target=_blank
style="color:#6B6B6B;"&gt;'.$chatmessage.'&lt;/a&gt;', $chatmessage);
</code></pre>

<p>Here is the error that I get:</p>

<p>Warning: preg_replace() [function.preg-replace]: Unknown modifier '(' in /echogetconversation.php on line 38.  line 38, is this:</p>

<pre><code>'&lt;a href="'.$chatmessage.'" target=_blank
style="color:#6B6B6B;"&gt;'.$chatmessage.'&lt;/a&gt;', $chatmessage);
</code></pre>

<p>If anyone could assist me it would be greatly appreciated.</p>
