As I've said, that can be done with Word's Find/Replace. There have been posts discussing that on these forums (e.g.
https://www.msofficeforums.com/word-...html#post95275). Or it can even be done with Regex within Word.
But, until you tell us what the strings and substrings are, it's a bit much expecting us to tell you how to do it if it entails the use of wildcards, especially.