Re: stripping quotes within an image tag

From: Date: Wed, 31 Jul 2002 12:33:24 +0000
Subject: Re: stripping quotes within an image tag
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-110502@lists.php.net to get a copy of this message
<? echo preg_replace('/(<img.+?src=)"([^"]+)"([^>]*>)/i', '\1\2\3', '<IMG height=44 alt=hspace=0 src="blah.jpg" width=148 border=0>'); ?> Elias, "Electroteque" <daniel@electroteque.org> wrote in message news:20020731112838.47299.qmail@pb1.pair.com... > hi how is it possible to strip quotes from an image tag ? > i need > <IMG height=44 alt=hspace=0 src="blah.jpg" width=148 border=0> > > to look like > <IMG height=44 alt=hspace=0 src=blah.jpg width=148 border=0> > >

« previous php.general (#110502) next »