Replace occurences of string corresponding to a regex
<p>I have the following strings:</p>

<pre><code>$a = "test1";
$b = "test&amp;nbsp;2";
$c = "test&amp;lt;3";
$d = "test&amp;4";
</code></pre>

<p>I would like to replace occurrences of "&amp;" followed by some letters and terminate by a ";".</p>

<p>The output should be :</p>

<pre><code>$a = "test1";
$b = "test 2";
$c = "test 3";
$d = "test&amp;4";
</code></pre>

<p>How can I do that with PHP?</p>