俺に考えられる最短はこれかな
re.sub(r'(?<=¥ba)(¥w*)(?=c¥b)',lambda s:s.group(0).upper(),text)