Added more regex cases for naming patterns reported to be common with comics. Some cases added without regex.

This commit is contained in:
Joseph Milazzo 2021-10-04 18:47:57 -05:00
parent f5594eade4
commit d07372b911
2 changed files with 16 additions and 0 deletions

View file

@ -312,6 +312,11 @@ namespace API.Parser
@"^(?<Series>.+?)(\s|_|-)?(?:Ep\.?)(\s|_|-)+\d+",
MatchOptions,
RegexTimeout),
// Batgirl Vol.2000 #57 (December, 2004)
new Regex(
@"^(?<Series>.+?)Vol\.?\s?#?(?:\d+)",
MatchOptions,
RegexTimeout),
// Batman & Catwoman - Trail of the Gun 01, Batman & Grendel (1996) 01 - Devil's Bones, Teen Titans v1 001 (1966-02) (digital) (OkC.O.M.P.U.T.O.-Novus)
new Regex(
@"^(?<Series>.+?)(?: \d+)",
@ -351,6 +356,11 @@ namespace API.Parser
@"^(?<Series>.*)(?: |_)v(?<Volume>\d+)",
MatchOptions,
RegexTimeout),
// Batgirl Vol.2000 #57 (December, 2004)
new Regex(
@"^(?<Series>.+?)(?:\s|_)vol\.?\s?(?<Volume>\d+)",
MatchOptions,
RegexTimeout),
};
private static readonly Regex[] ComicChapterRegex = new[]
@ -380,6 +390,11 @@ namespace API.Parser
@"^(?<Series>.+?)(?: |_)(c? ?)(?<Chapter>(\d+(\.\d)?)-?(\d+(\.\d)?)?)(c? ?)-",
MatchOptions,
RegexTimeout),
// Batgirl Vol.2000 #57 (December, 2004)
new Regex(
@"^(?<Series>.+?)(?:vol\.?\d+)\s#(?<Chapter>\d+)",
MatchOptions,
RegexTimeout),
// Batman & Catwoman - Trail of the Gun 01, Batman & Grendel (1996) 01 - Devil's Bones, Teen Titans v1 001 (1966-02) (digital) (OkC.O.M.P.U.T.O.-Novus)
new Regex(
@"^(?<Series>.+?)(?: (?<Chapter>\d+))",