This commit is contained in:
EstrellaXD
2022-05-17 00:17:09 +08:00
parent 6344ad22c6
commit a01807af11
8 changed files with 134 additions and 58 deletions

View File

@@ -1,6 +1,10 @@
import re
name = "Tate no Yuusha no Nariagari S02 "
name = "Tate no Yuusha no Nariagari S02"
season_rules = r'S(\d{0,3}|\d{1,3}\.\d{1,2})'
a = re.match(season_rules, name)
print(a)
season_rules = r'(.*)(S.\d)'
a = re.match(season_rules, name, re.I)
if a is not None:
print(a.group(1))
print(a.group(2))
else:
print(name)