preg_replace Problem

From: Date: Sun, 29 Oct 2000 23:52:32 +0000
Subject: preg_replace Problem
Groups: php.general 
Request: Send a blank email to php-general+get-22584@lists.php.net to get a copy of this message
preg_replace("src=\"?(^http://)(.*)\"?iU","src=\"http://www.blah.com/\\1\"",$var); is the regex that I'm using for an "email this article" script. It is supposed to take all relative image src's, ie <img src="images/blah.gif", and append "http://www.blah.com/" to them, so that in the replacement it will be: <img src="http://www.blah.com/images/blah.gif". It is also supposed to work when the image src is src=imageSrc, or src="imageSrc". But it doesn't do anything =(. Any ideas? Thanks, Anarchos

« previous php.general (#22584) next »