Ver Mensaje Individual
  #7 (permalink)  
Antiguo 08/01/2003, 08:33
Cluster
O_O
 
Fecha de Ingreso: enero-2002
Ubicación: Santiago - Chile
Mensajes: 34.417
Antigüedad: 22 años, 2 meses
Puntos: 129
Revisa dentro de las expresiones regulares:

preg_match_all()
http://www.php.net/manual/en/functio...-match-all.php

Justo uno de sus ejemplos es lo q buscas .. "Parsear" un HTML en busca de alguna etiquéta como la de un link HTML q tiene su formato definido.

Código PHP:
$html "<b>bold text</b><a href=howdy.html>click me</a>";

preg_match_all ("/(<([\w]+)[^>]*>)(.*)(<\/\\2>)/"$html$matches);

for (
$i=0$icount($matches[0]); $i++) { 
 echo 
"matched: ".$matches[0][$i]."\n"
 echo 
"part 1: ".$matches[1][$i]."\n"
 echo 
"part 2: ".$matches[3][$i]."\n"
 echo 
"part 3: ".$matches[4][$i]."\n\n";


Un saludo,