I'm struggling with Regex and it's not going well.
Let's say I have this:
<div class="abc">
<div class="def">
<div class="ghi">
<div class="jkl">
...
</div>
</div>
</div>
</div>
I want to match <div class="def">
and that </div>
before the last one. How can I do that with regex? I use this site for help: https://regex101.com/
This is my regex code: /<div class="def">(.*)<\/div>/isU
But it will not match the </div>
before the last one.