Ver Mensaje Individual
  #10 (permalink)  
Antiguo 19/02/2016, 14:54
Avatar de pateketrueke
pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: eliminar etiqueta img con php

Cierto, la expresión estaba mal.

Hice esto y funciona:
Código PHP:
Ver original
  1. $regex = '#<img[^<>]*?http://(?!dominio\.com)[^<>]*?>#i';
  2. $html = <<<HTML
  3.   <img src="http://placehold.it/260">
  4.   <img src="http://dominio.com" alt="x">
  5. HTML;
  6.  
  7. var_dump(preg_replace($regex, '', $html));
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.