I want to select a tag without custom class in my string have another a tag cannot select that's, String :
<h3 class="r"><a dir="rtl" class="sla" href="#"><span>test<span></a></h3>
<h3>test1</h3>
<h3 class="r"><a class="test" href="#">test2</a></h3>
<h3>test3</h3>
my Reg:
preg_match_all('@<h3\s*class="r">\s*<a[^<>]*href="([^<>]*)"[^<>]*>(.*)</a>\s*</h3>@siU',
$file, $matches);
how i can select all in pattern a tag without class="sla"