From 7756b03555c836e5a6a7dc9ead18e9552898241c Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Thu, 2 May 2019 13:18:28 +0200 Subject: [PATCH] Fixed: a after a shortened word is not removed correctly for matching. Fixes ##3487 --- src/NzbDrone.Core.Test/ParserTests/NormalizeTitleFixture.cs | 2 ++ src/NzbDrone.Core/Parser/Parser.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/NormalizeTitleFixture.cs b/src/NzbDrone.Core.Test/ParserTests/NormalizeTitleFixture.cs index d846eeee4..63122b53c 100644 --- a/src/NzbDrone.Core.Test/ParserTests/NormalizeTitleFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/NormalizeTitleFixture.cs @@ -25,6 +25,8 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("test/test", "testtest")] [TestCase("90210", "90210")] [TestCase("24", "24")] + [TestCase("I'm a cyborg, but that's OK", "imcyborgbutthatsok")] + [TestCase("Im a cyborg, but thats ok", "imcyborgbutthatsok")] public void should_remove_special_characters_and_casing(string dirty, string clean) { var result = dirty.CleanSeriesTitle(); diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index c6b2695fc..4b9a340bb 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -90,7 +90,7 @@ namespace NzbDrone.Core.Parser //Regex to detect whether the title was reversed. private static readonly Regex ReversedTitleRegex = new Regex(@"(?:^|[-._ ])(p027|p0801)[-._ ]", RegexOptions.Compiled); - private static readonly Regex NormalizeRegex = new Regex(@"((?:\b|_)(?