RegExpres Prob

From: Date: Thu, 19 Dec 2002 11:18:42 +0000
Subject: RegExpres Prob
Groups: php.general 
Request: Send a blank email to php-general+get-128843@lists.php.net to get a copy of this message
I have a regexp problem I want to go through some HTML and where <img src="path/to/image.jpg"> I want to change it to this <img src="http://www.domain.com/path/to/image.jpg"> BUT if the image tag is like this <img src="http://www.domain.com/path/to/image.jpg"> already I don't want anything to happen........ I thought this would do it: ereg_replace("src=\"(^http)","src=\"http://www.domain.com/", $string); but it didn't............... Argh... Cheers John Wards

« previous php.general (#128843) next »