My HTML contains divs
some of it dont have any content and some contains only white space. I want to remove those divs
with regular expression.
I written code but it seems not right. fiddle
var patt= new RegExp("<div></div>");
document.querySelector('.wrapper').innerHTML.replace(patt,'')