regex to replace @[name](type:id) to username
<p>i have this</p>

<pre><code>text @[Kenneth Hulthin](contact:9) and more text @[kenneth@auchenberg.dk](contact:7)
</code></pre>

<p>by php i want to replace using <a href="http://php.net/manual/en/function.preg-replace.php" rel="nofollow">preg_replace</a> from
 <code>@[name](type:id)</code>
 to 
<code>&lt;a href='?type=type&amp;id=id'&gt;name&lt;/a&gt;</code></p>
