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