Possible Duplicate:
Regex to change format of all img src attributes
Hi,
I want to replace the image path in my content db field.
I have the following
preg_replace("/src='(?:[^'\/]*\/)*([^']+)'/g","src='newPath/$2'",$content);
which is working fine for
src="/path/path/image.jpg"
BUT fails ON
src="http://www.mydomain.com/path/path/image.jpg"
Any help to bypass this problem?