Bom dia Senhores, Estou criando um seguinte script: Ele vai realizar a varredura no index de um site, aonde o mesmo vai separar somente algumas partes de algumas partes, exemplo: <html> <body> <div align="center"><span style="font-size:12px"> <a href="www.youtube.com">LINK 1</a> <b>Link1</b><br> <a href="www.youtube.com">LINK 2</a> <b>Link2</b><br> <a href="www.youtube.com">LINK 3</a> <b>link3</b><br> </div> <body> <html> Eu quero retornar somente os "a href" em um array: <a href="www.youtube.com?test22">LINK 1</a> <a href="www.youtube.com?ted2d">LINK 2</a> <a href="www.youtube.com?tAsdst22">LINK 3</a> Tentei da seguinte maneiro: $lines = file("http://www.damca.uni5.net/php/tes.php"); foreach($lines as $line_num => $line) { echo "Linha #<b>{$line_num}</b> : " .htmlspecialchars($line). "<br>\n"; preg_match_all('/<a href="http:\/\/www.youtube.com".*\ <\/a>/s', $line, $saida); echo htmlspecialchars($saida[0]); } Porém sem sucesso, alguém poderia me ajudar nessa questão Agradeço a todos Atenciosamente.