my %new_hash = map /$my_regexp/ ? ( $_ => $original_hash{ $_ } ) : (), keys %original_hash;