Here is my problem...
Based on the code below... I need a PHP script which uses Regex or some other way to extract the name of the div class which contains the text: TEXT1. In this case, return of the script should be: CLASSNAME_3
<div class="CLASSNAME_1">
<span class="CLASSNAME_2"></span>
<div class="CLASSNAME_3">
TEXT1
</div>
</div>
Reason for the script is, that the name of the class (CLASSNAME_3) is constantly changing, while the content of the class (TEXT1) is not.
I've researched this all over the web and also on stackoverflow, but I am unable to find the answer, nor any similar question which could help me to do this.