You could use a negative look-ahead assertion (see perlre) $sample =~ s{(img src=")(?!http)}{$1$http}g; which gives the following output:
<img src="http://domain.com/pics/local.jpg" alt="" /> <img src="http://remote.com/pics/remote.jpg" /> more confusion, just in case: 3:00pm 12/12/12 other urls <a href="http://fake.com"> http://fake.com</a>
But it's probably fraught with danger.
In reply to Re: Find and replace with regex
by FunkyMonk
in thread Find and replace with regex
by JayBee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |