For your examples, use a wildcard search for <Word_[AB]{1}>[!_]
See https://www.gmayor.com/replace_using_wildcards.htm