fork download
  1. import re
  2. s = '*CHI:\t<that> [/] (.) that (i)s it . [+ bch]\n'
  3. s = re.sub('(\(\.\))|[()]', lambda x: x.group(1) if x.group(1) else '', s)
  4. print(s)
Success #stdin #stdout 0s 23296KB
stdin
Standard input is empty
stdout
*CHI:	<that> [/] (.) that is it . [+ bch]