fork download
  1. import re
  2. s = "230030215840▒Cumul Arte▒pl▒PROGRAMME_WEB▒SCI_nauka▒075631-005-A▒TV▒1"
  3. tmp = s.split('▒')
  4. tmp[5] = re.sub(r'^(\d{6}-\d{3})-([A-Z])$', r'\g<0>▒\1\2', tmp[5])
  5. print("▒".join(tmp))
Success #stdin #stdout 0.04s 9888KB
stdin
Standard input is empty
stdout
230030215840▒Cumul Arte▒pl▒PROGRAMME_WEB▒SCI_nauka▒075631-005-A▒075631-005▒A▒TV▒1