Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/12/2012, 12:21
Avatar de JorM
JorM
 
Fecha de Ingreso: diciembre-2012
Ubicación: Argentina
Mensajes: 53
Antigüedad: 12 años, 2 meses
Puntos: 2
Respuesta: expresiones regulares duda

Código PHP:
<?php
$html 
'<a href="http://imageshack.us/photo/my-images/29/lovelysky.jpg/" target="_blank">
<img src="http://imageshack.us/a/img29/599/lovelysky.th.jpg" border="0"/></a>'
;

$exprRegular '#\/[a-z]\/[a-z]{3}[0-9]{2}\/[0-9]{3}\/[a-z]+\.[a-z]{2}\.[a-z]{3}#';
$result preg_match($exprRegular,$html,$matches);

echo 
$matches[0];

?>
Espero te sirva.!