fork(7) download
  1. import re
  2. s = 'e004_n07'
  3. res = re.sub(r'([a-zA-Z])0+', r'\1', s)
  4. print(res)
Success #stdin #stdout 0s 9024KB
stdin
Standard input is empty
stdout
e4_n7