This expr seems to handle all possibilities correctly:
(?m) # multiline mode
(^|\t) # start of line of field
\( # (
([^\t]+?) # anything but a tab
\) # )
(?= # followed by...
$|\t # end of line or field
)
replace with \1\2
.
Example:
import re
rx = r'(?m)(^|\t)\(([^\t]+?)\)(?=$|\t)'
txt = """
1 (hi7 (the)re) (my)
2 (hi7)there he3
(22) (hi7)there he3
(22) (hi7there) (he3)
"""
print re.sub(rx, r'\1\2', txt)
Result:
1 hi7 (the)re my
2 (hi7)there he3
22 (hi7)there he3
22 hi7there he3