Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: taking white space out between closing and opening tags

by dpuu (Chaplain)
on Aug 21, 2002 at 20:50 UTC ( #191867=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://191867]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2023-09-27 08:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?