regex How to match duplicate attribute names inside a single element (<>)
<p>I am trying to use regex to search for elements with duplicate style or class attributes.  I can only get matching lines but I'd like more defined matching to the actual element (inside the &lt;>).  Anyone have an example?  Below is some HTML and a search should only match the top div because it has two style attributes.</p>

<pre><code>&lt;div style="width:100%;" style="height:100%;"&gt;
&lt;div class="thisclass"&gt;Inner DIV&lt;/div&gt;
&lt;span class="thisstyle"&gt;Test Code&lt;/span&gt;
&lt;/div&gt;
</code></pre>

<p>I can get all lines that have duplicate attributes by using <code>&lt;.+(class)=("|').+?\2.+?\1.+&gt;</code> but that gives some false positives if there are multiple brackets/elements on the line.</p>