#!/usr/bin/perl my %text = map { $_ => 1 } ('&','”','&ldquo','''); while($line = ){ $line =~ s/(&(\w+?;)*)(\w+)(&(\w+?;)*)/exists $text{$1} ? $1 : defined ($2)/eg; print $3; chomp; } __DATA__ ” How big are & the Brothers? ” “ One day hiere last week, not knowing the cause, some floors of Rockefeller Center were evacuated when the floor shaking and screams of the lads' fans during a TV