fork(25) download
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. import re
  4. str = u'[DMSM-8433] 加護亜依 Kago Ai – 加護亜依 vs. FRIDAY'
  5. regex = u'[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]+ (?=[A-Za-z ]+–)'
  6. p = re.compile(regex, re.U)
  7. match = p.sub("", str)
  8. print match.encode("UTF-8")
  9.  
Success #stdin #stdout 0.03s 9320KB
stdin
Standard input is empty
stdout
[DMSM-8433] Kago Ai – 加護亜依 vs. FRIDAY