If you are running this on Linux then you don't have to worry about the difference between "text" and "binary".
perl -0777pe's!<div>Comments</div>!<div class="red">Comments</div>!g' +`find . -type f`
In reply to Re: Replacing text in many files, including binaries
by jwkrahn
in thread Replacing text in many files, including binaries
by lancer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |