Reinhard Pointner 2016-04-01 17:47:57 +00:00
parent b817d146a4
commit cba0483703
2 changed files with 3 additions and 1 deletions

View File

@ -148,7 +148,7 @@ public class ReleaseInfo {
// prefer standard value over matched value
if (lastMatch != null && paragon != null) {
for (String it : paragon) {
lastMatch = compile("(?<!\\p{Alnum})" + it.replaceAll("[\\p{Punct}\\s]", ".") + "(?!\\p{Alnum})", CASE_INSENSITIVE).matcher(lastMatch).replaceAll(it);
lastMatch = compile("(?<!\\p{Alnum})" + quote(it) + "(?!\\p{Alnum})", CASE_INSENSITIVE | UNICODE_CHARACTER_CLASS).matcher(lastMatch).replaceAll(it);
}
}

View File

@ -38,6 +38,8 @@ public class ReleaseInfoTest {
assertEquals("[]_Infinite_Stratos_2_-_01_[]", clean(info.getReleaseGroupTrimPattern(), "[HorribleSubs]_Infinite_Stratos_2_-_01_[HorribleSubs]"));
assertEquals("[]_Infinite_Stratos_2_-_01_[]", clean(info.getReleaseGroupPattern(true), "[HorribleSubs]_Infinite_Stratos_2_-_01_[HorribleSubs]"));
assertEquals("[]_Infinite_Stratos_2_-_01_[]", clean(info.getReleaseGroupPattern(false), "[HorribleSubs]_Infinite_Stratos_2_-_01_[HorribleSubs]"));
assertEquals("DVL", info.getReleaseGroup("Movie-DVL"));
}
@Test