tweak(anitomy): support EP

This commit is contained in:
cxfksword 2024-01-06 10:08:20 +08:00
parent f5cf162e67
commit f222258080
1 changed files with 1 additions and 1 deletions

View File

@ -371,7 +371,7 @@ namespace AnitomySharp
/// <returns>true if the token matched</returns> /// <returns>true if the token matched</returns>
private bool MatchSeasonAndEpisodePattern(string word, Token token) private bool MatchSeasonAndEpisodePattern(string word, Token token)
{ {
const string regexPattern = RegexMatchOnlyStart + @"S?(\d{1,2})(?:-S?(\d{1,2}))?(?:x|[ ._-x]?E)(\d{1,4})(?:-E?(\d{1,4}))?(?:[vV](\d{1,2}))?" + RegexMatchOnlyEnd; const string regexPattern = RegexMatchOnlyStart + @"S?(\d{1,2})(?:-S?(\d{1,2}))?(?:x|[ ._-x]?EP?)(\d{1,4})(?:-E?P?(\d{1,4}))?(?:[vV](\d{1,2}))?" + RegexMatchOnlyEnd;
var match = Regex.Match(word, regexPattern); var match = Regex.Match(word, regexPattern);
if (!match.Success) return false; if (!match.Success) return false;