我有一个这样的字符串:
$string = 'this is some random text
<div class="myClass" title="myTitle">this is some random text
again</div> and some more randome text';
现在我想从中删除此内容:
<div class="myClass" title="myTitle">this is some random text again</div>
但同时我想存储class的值和title的值
关于如何解决这个问题的任何想法?