title: javascript replace div tags for p tags where it has no class
body: <p>I would like to replace div tags for p tags but only when the div tag does not have a class.</p>
  
  <p>So this:</p>
  
  <pre><code>&lt;div class="myDiv"&gt;
     &lt;div&gt;sdfglkhj sdfgkhl sdfkhgl sdf&lt;/div&gt;
     &lt;div&gt;dsf osdfghjksdfg hsdfg&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Would become:</p>
  
  <pre><code>&lt;div class="myDiv"&gt;
     &lt;p&gt;sdfglkhj sdfgkhl sdfkhgl sdf&lt;/p&gt;
     &lt;p&gt;dsf osdfghjksdfg hsdfg&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I've tried <code>.replace("&lt;div&gt;", "&lt;p&gt;").replace("&lt;/div&gt;","&lt;/p&gt;")</code> but this replaces the closing tag of the one with a class.</p>