Here's what I want to locate and replace. Any instance of this.
<img src="/folder/image.jpg" width="100" height="100">And I want to whipe out the height/widths, XHTML validate it, and transform it for a thumbnail script I made for this.
<a href="/folder/image.jpg"><img src="/resize.php?src=folder/image.jpg" alt="" /></a>Basically, it takes the image's source, takes out the slash (which may or not be there), pushes in the '/resize.php?src=' then whipes the height/width and adds a blank alt attribute and a backslash for self-closing. It then takes the image and wraps it in a hyperlink with the image's source.
This is for a content management system I've built for someone by the way, and he has a habit of using Dreamweaver for writing his tutorials, and I need to automatically make all the images into thumbnails and clean up other code before I put them into the database.
Any chance anyone could help me out a bit.
