Have you had a look at the Replace Text extension? That is an easy way to do a global search-and-replace in a certain namespace. The caveat is that it searches for the presence of a string or regex, rather than the absence.
There isn't enough detail in your description to know whether it's going to be possible to test for the absence of the string with a regex, but you might be able to do something like add <Tag>
to all the pages, then search for pages containing <Tag>
and your target string, and remove <Tag>
from those pages.