http://qs321.pair.com?node_id=191867


in reply to taking white space out between closing and opening tags

split the problem: first get the string, then condense it. Assuming you can't use any of te std XML/HTML modules to get the text, you could try:
sub condense { $_[0] =~ s/\s+/ /g } $in =~ s/(<tag>)(.*?)(<\/tag>)/ $1 . condense($2) . $3 /ge;
--Dave