title: How to remove or close unclosed HTML in JavaScript?
body: <p>Supposedly I have a string like this that will go to my HTML:</p>
  <pre><code>&lt;div&gt;Wakanda Forever&lt;/div&gt; &lt;span class=&quot;movie&quot;&gt;Black Panther&lt;/span&gt;
  Movies movies movies 
  &lt;span class=&quot;movie&quot;&gt;Spider man...
  </code></pre>
  <p>The last span tag isn't closed.</p>
  <p>In Regular expression and JavaScript, how can I remove  the unclosed <code>&lt;span class=&quot;movie&quot;&gt;</code> from <code>&lt;span class=&quot;movie&quot;&gt;Spider man...</code> or close it with a <code>&lt;/span&gt;</code> tag?</p>