fork(1) download
  1. import re
  2. s = "a\n\tb\n\t\tc\n\td\te\nf\t\tg";
  3. print(re.sub(r"^\t+", lambda m: " "*len(m.group()), s, flags=re.M))
Success #stdin #stdout 0s 9024KB
stdin
Standard input is empty
stdout
a
  b
    c
  d	e
f		g