Locate specific css class

Hi there

trying to figure out how to achieve the following:

<h4 onmouseout="tooltip.hide();" class="complianceClass3 h">
                <a onmouseout="tooltip.hide();" class="trigger" style="display: block;">
                </a>
                <a class="drillDownPlusHead trigger" id="anchorDebt" onclick="changeMeCompliance('drillDownPlusHead', 'anchorDebt');" style="display: block;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DEBT
                                  </a>
              </h4>
<h4 onmouseout="tooltip.hide();" class="complianceClass1 h">
                <a onmouseout="tooltip.hide();" class="trigger" style="display: block;">
                </a>
                <a class="drillDownPlusHead trigger" id="anchorSD" onclick="changeMeCompliance('drillDownPlusHead', 'anchorSD');" style="display: block;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RELEVANT SUPPORTING DOCUMENTS
                                  </a>
              </h4>

in the above you will see two classes, where compliance type can either be class3 or class1, and this is repeated 4 times potentially, I want to to check if there is a compliance type 3 anywhere, then do whatever comes next.

How do I get it to focus specifically on this? xpath is of no assistance in this regard as it doesnt alter depending on the status of the compliance type.

So I have been googling and came across this:

particularly the reference to classes, and so the html tag in this should be h4 and the value of the ID attribute is anchorReg? although not sure if that would find what I am looking for