So i have a string that i want to search through using regex, and not any other method like domDocument etc.
Example:
<div class="form-item form-type-textarea form-item-answer2">
<div class="form-textarea-wrapper resizable"><textarea id="edit-answer2" name="answer2" cols="60" rows="5" class="form-textarea">
this is some text
</textarea>
</div>
</div>
Desired:
this is some text
So what i want to do from this is using 1 regex line be left with 'this is some text', which is not fixed and will be dynamic. I will then pass this through a preg_replace to get desired outcome.
Current regex is
div class="form-item.*class="form-textarea">$\A<\/textarea>.*<\/div>/gU
I have tried using the end of string and start of string anchors, but to no avail.