diff --git a/source/net/sourceforge/filebot/cli/ScriptShellMethods.java b/source/net/sourceforge/filebot/cli/ScriptShellMethods.java index 2aa92d07..9d741793 100644 --- a/source/net/sourceforge/filebot/cli/ScriptShellMethods.java +++ b/source/net/sourceforge/filebot/cli/ScriptShellMethods.java @@ -260,6 +260,10 @@ public class ScriptShellMethods { return WebRequest.post(self, text.getBytes("UTF-8"), "text/plain", requestParameters); } + public static ByteBuffer post(URL self, byte[] postData, String contentType, Map requestParameters) throws IOException { + return WebRequest.post(self, postData, contentType, requestParameters); + } + public static File saveAs(ByteBuffer self, String path) throws IOException { return saveAs(self, new File(path)); } diff --git a/source/net/sourceforge/filebot/format/ExpressionFormatMethods.java b/source/net/sourceforge/filebot/format/ExpressionFormatMethods.java index 51fb767b..5f34c161 100644 --- a/source/net/sourceforge/filebot/format/ExpressionFormatMethods.java +++ b/source/net/sourceforge/filebot/format/ExpressionFormatMethods.java @@ -81,6 +81,10 @@ public class ExpressionFormatMethods { } } + public static String replaceAll(String self, String pattern) { + return self.replaceAll(pattern, ""); + } + public static String removeAll(String self, String pattern) { return compile(pattern, CASE_INSENSITIVE | UNICODE_CASE | MULTILINE).matcher(self).replaceAll("").trim(); }