The easy way to do this is in two steps.
First, sub each (BB)
to (B/B)
(which you can even do with str.replace
instead of re.sub
if you want).
Then, since (B/B)
no longer matches the pattern, your existing code already does the right thing.
So:
data = re.sub(r'\(BB\)', '(B/B)', data)
data = re.sub(r'\s*\(\w+\)\s*$', '', data)