I am trying to figure out how to use Regex in PHP to backtrack and find a </div>
tag preceding some specific html.
Here is the full HTML I want to look at including the closing tag I want to find and ultimately remove from the string:
</div>
<div class="dHeading">Grades
It actually has a new line and spaces in between the 2 tags. So I want to target that </div>
tag and remove it from the string. Any help would be appreciated.
I am using an online regex tester. Here is what I have right now.
Regex:
/(</div>)([\w\W]*?)(<div)/