Replace specific values in a block of text leaving the text that is in between what I am searching for
<p>I would like to convert this text <code>{unsubscribe|here.}</code> to <code>&lt;a href=""&gt;here.&lt;/a&gt;</code>.</p>

<p>I have already wrote the regular expression that picks up the different groups of matches.</p>

<p>In this case I know I can preg/str_replace the front and the end (<code>}</code>) of the text however this would be ineffective as i also would like to strip out another value like this which would be <code>{name}</code> for example.</p>

<p>This is the regular expression I have wrote. <code>/(\{unsubscribe\|)([a-z]*[^\}])(\})/</code></p>

<p>Thanks,</p>
