From 9949224e2bb9d56f424272a22fe7b8ddf6926387 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Fri, 8 Jan 2016 13:28:46 +0000 Subject: [PATCH] added String.removeIllegalCharacters convenience function --- source/net/filebot/format/ExpressionFormatMethods.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/net/filebot/format/ExpressionFormatMethods.java b/source/net/filebot/format/ExpressionFormatMethods.java index 27b41e20..1fef898f 100644 --- a/source/net/filebot/format/ExpressionFormatMethods.java +++ b/source/net/filebot/format/ExpressionFormatMethods.java @@ -95,6 +95,10 @@ public class ExpressionFormatMethods { return compile(pattern, CASE_INSENSITIVE | UNICODE_CHARACTER_CLASS | MULTILINE).matcher(self).replaceAll("").trim(); } + public static String removeIllegalCharacters(String self) { + return FileUtilities.validateFileName(Normalization.normalizeQuotationMarks(self)); + } + /** * Replace space characters with a given characters. *