I need a simple script that will:
1) loop through all the html files in a directory and it's subdirectories
2) Open each file and find a string using regex: e.g. style="(width): ([0-9]+px); (height): ([0-9]+px);"
3) replace the string with $1="$2" $3="$4" (should look like width="123px" height="123px"
4) Close and save the file.
I need to make several different search and replace operations, so the search and replace operation needs to happen a few times in each file.
Hopefully the script will be simple enough to read so that I can tweak it as needed.
Would like the script very soon.