in reply to Find and replace with regex

$domain="http://www.google.com"; s|(<img [^>]*?src=")(?!$domain)(.+?)"|$1domain$2"|g;