How to replace text in many nodes?
The Drush Search and Replace plugin may be of some use

This drush plugin performs a text search &amp; replace on all content and content revisions in all text fields and all custom blocks on a Drupal site.
It does this directly in the database, not by loading, editing and then saving entities, so it is very fast. This also means you should clear the Drupal caches after you run this command.

Hopefully it goes without saying you should give this a dry run before applying it to a live site, how well it works will depend on exactly what data you have in the fields.