import re
res = re.sub(r"(?i)(?<=\W)the(?!\w)", "zzz", "The Thing To (The) Theme of Athens, The Goethe")
print(res)