Regex match <a> tag
<p>I want to select a tag without custom class in my string have another a tag cannot select that's, 
String :</p>

<pre><code>&lt;h3 class="r"&gt;&lt;a dir="rtl" class="sla" href="#"&gt;&lt;span&gt;test&lt;span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h3&gt;test1&lt;/h3&gt;
&lt;h3 class="r"&gt;&lt;a class="test" href="#"&gt;test2&lt;/a&gt;&lt;/h3&gt;
&lt;h3&gt;test3&lt;/h3&gt;
</code></pre>

<p>my Reg:</p>

<pre><code>preg_match_all('@&lt;h3\s*class="r"&gt;\s*&lt;a[^&lt;&gt;]*href="([^&lt;&gt;]*)"[^&lt;&gt;]*&gt;(.*)&lt;/a&gt;\s*&lt;/h3&gt;@siU',
        $file, $matches);
</code></pre>

<p>how i can select all in pattern  a tag without class="sla"</p>