diff --git a/Conversion/Scanners/BaseScanner.cs b/Conversion/Scanners/BaseScanner.cs index bf007ef..d202343 100644 --- a/Conversion/Scanners/BaseScanner.cs +++ b/Conversion/Scanners/BaseScanner.cs @@ -16,7 +16,7 @@ public abstract class BaseScanner public static string NumberRegex = "((?:(?:\\.|,)?\\d+(?:[\\.,\\s]\\d+)*(?:(?:\\.|,)\\d+)?))"; //Omitting front slash from here because we dont want it to catch fractions - public static string WordSeparatorRegex = "[<>.,;:\\-_!#¤&()=?`@{}+´¨~*'\"]"; + public static string WordSeparatorRegex = "[<>.,;:\\-_!#¤&()=?`@{}+´¨~*'\"\\/]"; public static bool Parse(string str, out double amount) { diff --git a/Tests/Conversion/Scanners/SingleRegexScannerTests.cs b/Tests/Conversion/Scanners/SingleRegexScannerTests.cs index f88222f..5ad7240 100644 --- a/Tests/Conversion/Scanners/SingleRegexScannerTests.cs +++ b/Tests/Conversion/Scanners/SingleRegexScannerTests.cs @@ -52,6 +52,11 @@ public void Tests() (4, "l", 1), (60.0, "g", 1) }), + ("Our 25.4lbs/11.5kg recent rescue Oliver.", new[] + { + (25.4, "lbs", 3), + (11.5, "kg", 3) + }) }; ScannerUtils.Test(new SingleRegexScanner(), strs, (expected, actual) => diff --git a/Tests/TextAnalyzerTests.cs b/Tests/TextAnalyzerTests.cs index 9f04a9e..89b9326 100644 --- a/Tests/TextAnalyzerTests.cs +++ b/Tests/TextAnalyzerTests.cs @@ -175,7 +175,6 @@ public void NoCascades() [DataRow("But a \"quote that happens to end with 12\" should not work", null, false)] [DataRow("A phrase with a \"quote\" and also a 12\" should work", "12\" ≈ 30.5 centimetres", false)] [DataRow("A phrase with a \"quote\" and also a 12\" should work, even with \"quotes\" after", "12\" ≈ 30.5 centimetres", false)] - [DataRow("A phrase with a \"quote\" and also a 12\" should work, even with \"quotes\" and /1\" after", "12\" ≈ 30.5 centimetres", false)] public void ConvertSingle(string input, string expected, bool novelty) { var results = (novelty ? _noveltyAnalyzer : _regularAnalyzer).FindConversions(input);