From 1564efc27c6526626815ad3b0695f2462b7b3b58 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Tue, 5 Apr 2016 18:05:55 +0000 Subject: [PATCH] Make patterns public --- .../net/filebot/similarity/Normalization.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) 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) {