in reply to HTML Entities

just lookahead to make sure the '&' is not followed by 'amp;' :
s/&(?!amp;)/&/g
hth
   larryk                                          
perl -le "s,,reverse killer,e,y,rifle,lycra,,print"