diff --git a/source/net/filebot/similarity/Normalization.java b/source/net/filebot/similarity/Normalization.java index 7df2cfd7..4bad36a9 100644 --- a/source/net/filebot/similarity/Normalization.java +++ b/source/net/filebot/similarity/Normalization.java @@ -8,13 +8,13 @@ import java.util.regex.Pattern; public class Normalization { - private static final Pattern apostrophe = compile("['`´‘’ʻ]+"); - private static final Pattern punctuation = compile("[\\p{Punct}\\p{Space}]+", UNICODE_CHARACTER_CLASS); - private static final Pattern spaceLikePunctuation = compile("[:?._]"); + public static final Pattern APOSTROPHE = compile("['`´‘’ʻ]+"); + public static final Pattern PUNCTUATION_OR_SPACE = compile("[\\p{Punct}\\p{Space}]+", UNICODE_CHARACTER_CLASS); + public static final Pattern WORD_SEPARATOR_PUNCTUATION = compile("[:?._]"); - private static final Pattern trailingParentheses = compile("(? Doctor Who - return trailingParentheses.matcher(name).replaceAll("").trim(); + return TRAILING_PARENTHESIS.matcher(name).replaceAll("").trim(); } public static String truncateText(String title, int limit) {