Tag: regular expressions text search and replace bbedit mac code software

Use BBEdit to replace the entire contents of multiple files

A few months ago, I needed to revise an HTML file that is used many times across a large website. Most of the key code associated with this file is contained in centrally-located includes, but as luck would have it, this time the entire file needed to be revised – even the user-customized bits. That meant that almost a thousand files would have to be replaced. Worse, they were not entirely the same, since they were customized by the users to some extent.

After checking a few of them, I found there were enough commonalities to serve as the basis of a regular expression search. They always started with a comment, like this:

<!--/ *v

Continue reading