I want to remove the empty paragraphs in html:
<p> </p>
use /<p> <\/p>/ can't match this while use /<p>.{0,2}<\/p>/ works, why?
/<p> <\/p>/
/<p>.{0,2}<\/p>/
When you need a new line, (return) comes before (new), so in your expression you should use .