I have some HTML and want to replace the "src" attributes of all the img tags so that they point to copies of the identical images (although with different file names) on another host.
So for instance, given these three tags
<IMG SRC="../graphics/pumpkin.gif" ALT="pumpkin">
<IMG BORDER="5" SRC="redball.gif" ALT="*">
<img alt="cool image" src="http://www.crunch.com/pic.jpg"/>
I would like them replaced with
<IMG SRC="http://myhost.com/cache/img001.gif" ALT="pumpkin">
<IMG BORDER="5" SRC="http://myhost.com/cache/img002.gif" ALT="*">
<img alt="cool image" src="http://myhost.com/cache/img003.jpg"/>
I know there is some regexp magic to this, just not sure what it should look like (or if this is in fact the best way).