Ver Mensaje Individual
  #5 (permalink)  
Antiguo 03/09/2007, 14:27
Deivit82
 
Fecha de Ingreso: agosto-2007
Mensajes: 5
Antigüedad: 19 años, 1 mes
Puntos: 0
Re: Expresión Regular

Al final lo he solucionaod así:

Código PHP:
$regex[]  ="/[H|h]eight=\"?\'?[0-9]{0,3}\"?\'?/"; 
    
$regex[]  ="/[W|w]idth=\"?\'?[0-9]{0,3}\"?\'?/"; 
    
$regex[]  ="/[H|h]eight: ?[0-9]{0,3}(px)?/"; 
    
$regex[]  ="/[W|w]idth: ?[0-9]{0,3}(px)?/"; 
    
    
$replacements[] = " height='{$alcada}' "; 
    
$replacements[] = " width='{$amplada_max}' "; 
    
$replacements[] = " height:".$alcada."px"; 
    
$replacements[] = " width:".$amplada_max."px"; 
    
    
$amb_cursiva_sortida = preg_replace($regex, $replacements, $cadena); 
Gracias!