diff --git a/comicfn2dict/regex.py b/comicfn2dict/regex.py index 5a61484..c7272c7 100644 --- a/comicfn2dict/regex.py +++ b/comicfn2dict/regex.py @@ -112,12 +112,12 @@ ORIGINAL_FORMAT_SCAN_INFO_SEPARATE_RE = re_compile( # REGULAR TOKENS VOLUME_RE = re_compile(r"((?:v(?:ol(?:ume)?)?\.?)\s*(?P\d+))") _ISSUE_NUMBER_RE_EXP = r"(?P[\w½]+\.?\d*\w*)" -ISSUE_NUMBER_RE = re_compile(r"(#" + _ISSUE_NUMBER_RE_EXP + r")") +ISSUE_NUMBER_RE = re_compile(r"(\(?#" + _ISSUE_NUMBER_RE_EXP + r"\)?)") _ISSUE_RE_EXP = r"(?P[\d½]+\.?\d*\w*)" -ISSUE_END_RE = re_compile(r"([\/\s]" + _ISSUE_RE_EXP + r"(\/|$))") -ISSUE_BEGIN_RE = re_compile(r"((^|\/)" + _ISSUE_RE_EXP + r"[\/|\s])") -ISSUE_ANYWHERE_RE = re_compile(r"\b(" + _ISSUE_RE_EXP + r")\b") +ISSUE_END_RE = re_compile(r"([\/\s]\(?" + _ISSUE_RE_EXP + r"\)?(\/|$))") +ISSUE_BEGIN_RE = re_compile(r"((^|\/)\(?" + _ISSUE_RE_EXP + r"\)?[\/|\s])") +ISSUE_ANYWHERE_RE = re_compile(r"\b(\(?" + _ISSUE_RE_EXP + r"\)?)\b") # LONG STRINGS REMAINING_GROUP_RE = re_compile(r"^[^\()].*[^\)]")