in reply to Find and replace with regex
Something simpler is that you don't have to use the full domain path if you just use the root tree basis. Your example shows <img src="directory/image.jpg" />, which is a relative path and is not transportable between page hierarchies. The simple addition of a leading slash, as in "/directory/image.jpg" may be all the change you need.
In Section
Seekers of Perl Wisdom