$content = 'text <div>sample text<div>sample<div>sample</div>sample</div><div>sample</div></div><figure><p>sample</figure>';
I wanted to get the output as 'text'
Tried many regex found in StackOverflow, but nothing really do my purpose exactly.
$content = 'text <div>sample text<div>sample<div>sample</div>sample</div><div>sample</div></div><figure><p>sample</figure>';
I wanted to get the output as 'text'
Tried many regex found in StackOverflow, but nothing really do my purpose exactly.