I've got a bunch of html files, and all the img tags have the slashes the wrong way!
Here's an example (except it's one line in the code, split here for ease of viewing)
<a href=index.html><img src="images\homereg.png" /></a>
<img src="images\spacer.png" />
<a href=dogs.html><img src="images\dogsreg.png" /></a>
<img src="images\spacer.png" />
<a href=litters.html><img src="images\littersreg.png" /></a>
<img src="images\spacer.png" />
<a href=bredby.html><img src="images\bredbyreg.png" /></a>
<img src="images\spacer.png" />
<a href=contact.html><img src="images\contactreg.png" /></a>
My problem with what I've tried so far is that sed is greedy, so it's matching too much and not replacing it properly. Something like sed -i 's|images\\\(.*\)\"|images/\1\"|g' * will replace one per line, it's matching too much. I've tried some other things, but all along the same line as this.
What's the easiest solution? I'm not limited to sed, I just know it best so it's what I've tried.