Why use a regular expression?
$new_string = str_replace('img src="','img
src="http://www.domain.com/',$old_string);
---John Holmes...
----- Original Message -----
From: "John Wards" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 19, 2002 6:18 AM
Subject: [PHP] RegExpres Prob
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php