Strip unwanted tag in a string (no JQuery)
<p>I have a string that contains the following:</p>

<pre><code>&lt;span&gt;A&lt;/span&gt;BC&lt;span id="blabla"&gt;D&lt;/span&gt;EF
</code></pre>

<p>i want to be able to use the JavaScript replace function with regx expression to only remove the spans that do not have an id. So that the result would look like</p>

<pre><code>ABC&lt;span id="blabla"&gt;D&lt;/span&gt;EF
</code></pre>

<p>I am really not interested in using jQuery. I would rather use pure JavaScript to solve the problem. I have the following but it does not seem to properly work</p>

<pre><code>myText.replace(/(&lt;([^&gt;]+)&gt;)/ig,"");
</code></pre>

<p>Any help would be appreciated! </p>
