fork download
  1. import re
  2. s = '/* comment */ variable owner; /* comment */'
  3. rx = r'/\*[^*]*\*+(?:[^/*][^*]*\*+)*/'
  4. print(re.sub(rx, '', s))
Success #stdin #stdout 0.01s 9024KB
stdin
Standard input is empty
stdout
 variable owner;