<?php
$html = <<<HTML
<p class="p2 p2-resultado-busca"><span>Conteúdo desejado 1</span><strong>Conteúdo Indesejado</strong></p>
<p class="p2 p2-resultado-busca"><span>Conteúdo desejado 2</span><strong>Conteúdo Indesejado</strong></p>
<p class="p2 p2-resultado-busca"><span>Conteúdo desejado 3</span><strong>Conteúdo Indesejado</strong></p>
HTML;
$dom = new domDocument('1.0', 'utf-8');
$dom->loadHTML($html);
$dom->preserveWhiteSpace = false;
$xpath = new DOMXPath($dom);
$content = $xpath->query('//p[@class="p2 p2-resultado-busca"]//span');
foreach($content as $span){
echo $span->textContent;
}
PD9waHAKCiRodG1sID0gPDw8SFRNTAo8cCBjbGFzcz0icDIgcDItcmVzdWx0YWRvLWJ1c2NhIj48c3Bhbj5Db250ZcO6ZG8gZGVzZWphZG8gMTwvc3Bhbj48c3Ryb25nPkNvbnRlw7pkbyBJbmRlc2VqYWRvPC9zdHJvbmc+PC9wPgo8cCBjbGFzcz0icDIgcDItcmVzdWx0YWRvLWJ1c2NhIj48c3Bhbj5Db250ZcO6ZG8gZGVzZWphZG8gMjwvc3Bhbj48c3Ryb25nPkNvbnRlw7pkbyBJbmRlc2VqYWRvPC9zdHJvbmc+PC9wPgo8cCBjbGFzcz0icDIgcDItcmVzdWx0YWRvLWJ1c2NhIj48c3Bhbj5Db250ZcO6ZG8gZGVzZWphZG8gMzwvc3Bhbj48c3Ryb25nPkNvbnRlw7pkbyBJbmRlc2VqYWRvPC9zdHJvbmc+PC9wPgpIVE1MOwoKJGRvbSA9IG5ldyBkb21Eb2N1bWVudCgnMS4wJywgJ3V0Zi04Jyk7IAokZG9tLT5sb2FkSFRNTCgkaHRtbCk7IAokZG9tLT5wcmVzZXJ2ZVdoaXRlU3BhY2UgPSBmYWxzZTsgCgokeHBhdGggPSBuZXcgRE9NWFBhdGgoJGRvbSk7CiRjb250ZW50ID0gJHhwYXRoLT5xdWVyeSgnLy9wW0BjbGFzcz0icDIgcDItcmVzdWx0YWRvLWJ1c2NhIl0vL3NwYW4nKTsKCmZvcmVhY2goJGNvbnRlbnQgYXMgJHNwYW4pewogICAgZWNobyAkc3Bhbi0+dGV4dENvbnRlbnQ7Cn0=