Explorar o código

Added lowercase

Moritz Schmidt %!s(int64=10) %!d(string=hai) anos
pai
achega
75328d5d1b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      main.py

+ 1 - 1
main.py

@@ -6,7 +6,7 @@ import os, sys, re
 files = [f for f in os.listdir('.') if os.path.isfile(f) and f.startswith(sys.argv[1])]
 for f in files:
     print f
-    match = re.match(r'([a-zA-Z.]*).(S[0-9]*E[0-9]*).([a-zA-Z0-9äöüÄÖÜß\-\.\,\w]*)', f)
+    match = re.match(r'([a-zA-Z.]*).([S|s][0-9]*[E|e][0-9]*).([a-zA-Z0-9äöüÄÖÜß\-\.\,\w]*)', f)
     newName = match.group(1) + "-" + match.group(2) + "-" + match.group(3)
     print newName
     os.rename(f, newName)