I have no control over the string source, I can only do html()
, but I need to clean up the mess in the source,
I want to delete all the <div class="page"></div>
but keep its content, and because the content also contains html tags which may not be fully completed like <div class="
http://jsbin.com/vukogobuze/1/edit?html,js,console,output
expected output
<div class="nodejs-class">La France està déployer ses porte-avions Charles de Gaulle pour soutenir les opérations contre l'État islamique ( IS) en Syrie et en Irak la présidence française a déclaré après une réunion du cabinet de défense</div>