Basically I need to remove all the empty paragraphs from a text. The following does not seem to work…
String postLevel = content.replaceAll("<p>\\s*</p>", "");
Any thoughts as to why?
Non-ascii characters got into the string somehow…..I removed them and this worked. LOLz
I would try this expression instead:
This would take care of
<p></p>and<p/>empty paragraphs as well.