|
Replace text in multiple files
Ok guys,
If anyone could help me out on this puppy I'd be very appreciative!
Here's the scenario
I have a string for example :
<img src=BLANK_IMG border=0 width=221 height=12>
or
<img src=IMG border=0 height=12 width=221 >
or anything else really....
need to basically change each one to include alt=""
<img src=IMG alt="" .....yada yada....... >
Every line I need to change is guaranteed to start with "<img" and end with a ">" (of course..) the rest is variable.
Also...for bonus points !!! Those <img tags that DO have the alt="" line already, but in a different position, I want to MOVE IT to be next to the src
eg
move
<img src=IMG border=0 height=12 width=221 alt="">
to
<img src=IMG alt="" border=0 height=12 width=221>
Any ideas?
Thanks!
|