Parcourir la source

Added lowercase

Moritz Schmidt il y a 10 ans
Parent
commit
75328d5d1b
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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)