Use more idiomatic regular expression string

Co-authored-by: Timmy Welch <timmy@narnian.us>
This commit is contained in:
abuchanan920 2022-04-05 10:37:33 -04:00 committed by GitHub
parent 4c7d4c312d
commit e85fae86f4

View File

@ -89,7 +89,7 @@ class FileNameParser:
# is the series name followed by issue # is the series name followed by issue
filename = re.sub(r"--.*", self.repl, filename) filename = re.sub(r"--.*", self.repl, filename)
elif "__" in filename and not re.search('\\[__\\d+__\\]', filename): elif "__" in filename and not re.search(r"\[__\d+__\]", filename):
# the pattern seems to be that anything to left of the first "__" # the pattern seems to be that anything to left of the first "__"
# is the series name followed by issue # is the series name followed by issue
filename = re.sub(r"__.*", self.repl, filename) filename = re.sub(r"__.*", self.repl, filename)