$data =~ s/(](?!href))*.?href\s*)(&\#61;\s*(&[^;]+;)?(?:.(?!\3))+.?(?:\3)?)([^>]+>)/$1.decode_entities($2).$4/gsei;