You can use?! to not match & followed by amp;
$string =~ s/&(?!amp;)/&/ig;
but if you are sure there will never be & in the string then just use the regexp already posted.
[edited by: coopster at 9:17 pm (utc) on Mar. 9, 2006]
[edit reason] disabled graphic smile faces ;-) [/edit]
<pedant mode="on"> </pedant> -b