my $str = do { local $/; }; $str =~ s!<(script|style|option|textarea)[^>]*?>.*?]*?>!!gsi; # In fact when you turn on the non-greedy match with '?', you # don't need the [^>] either... So the following regex works # equally well: # $str =~ s!<(script|style|option|textarea).*?>.*?!!gsi; print "$str\n"; __DATA__ This is not removed.