Welcome to the Monastery | |
PerlMonks |
Re: HTML String Parsingby greywolf (Priest) |
on Dec 10, 2001 at 00:19 UTC ( [id://130560]=note: print w/replies, xml ) | Need Help?? |
Since I am not a regex master I would do it in 2 steps. The first simply replaces every newline with a break. The second replaces every pair of breaks with a single break. The & may need to be escaped, I can't test this right now to be sure.
It's not the most elegant solution and I'm sure somebody else will whip up something really cool. It should do the trick though. mr greywolf
In Section
Seekers of Perl Wisdom
|
|