This is the HTML forum, not the Dreamweaver.
Were this in XHTML then I would use JScript or PHP running locally to parse the file and make the change. With HTML I would use PHP to parse it as if it were XHTML. Regular expressions are also an option but parsing is always better.
What scripting do you have available locally? Are you running Windows?
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web