If character<p></p> # For the character <.
exists at the end of the character <.'>'
#!/usr/bin/perl while (<DATA>) { if($_ =~ /<.+>(<.+>)(.*)/){ $output = $1.$2; $output =~ s/(<|\\)/<\/p><p>/g; print $output; } } __DATA__ <BODY><![CDATA[<p>Developmentally, 2-year-olds are generally more inte +rested in themselves, while dogs do care how their people feel, and i +nstantly recognize a change in emotion.< "While your dog can't compre +hend that you just received a traffic violation, he can tell that you +'re upset the second you walk through the door," Coren says. "In fact +, dogs can detect some subtle changes which even adults can't," adds +Coren. "We can't smell cancer or predict seizures, as dogs can."< Whe +n I posted this story on my Facebook Fan page recently (<a href="http +://www.new.facebook.com/pages/ Steve-Dale/50057343596?ref=ts">www.new +.f acebook.com/pages/Steve-Dale/50057343596?ref=ts, or simply type St +eve Dale into the Facebook search), I received some interesting respo +nses:< Kelle: "Heck, my Italian Greyhound is smarter than most colleg +e students."< Karen: "Depends on how you define smart.
In reply to p tag substitution by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |