fork download
  1. import re
  2. s = """ s_Tmp = 'ERROR: month "' | s_Month | '" not valid - ABORT' | CHAR(13) | CHAR(10) ;"""
  3. res = re.sub(r"^(\s*)(.*)", lambda x: "{}{}".format(x.group(1), x.group(2).replace("\t", " ")), s, re.S)
  4. print(res)
Success #stdin #stdout 0.01s 23304KB
stdin
Standard input is empty
stdout
  		s_Tmp  = 'ERROR: month "' | s_Month       |   '" not valid - ABORT' | CHAR(13) | CHAR(10) ;