mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-02 08:25:02 -04:00
Replace slash and backslash to make sure the result is not a file path.
This commit is contained in:
parent
38d4e7c250
commit
0acd0e885a
@ -146,6 +146,15 @@ public class ExpressionFormatMethods {
|
||||
return compile("\\s*[:]\\s*", UNICODE_CHARACTER_CLASS).matcher(self).replaceAll(replacement);
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace slash and backslash to make sure the result is not a file path.
|
||||
*
|
||||
* e.g. "V_MPEG4/ISO/AVC" -> "V_MPEG4.ISO.AVC"
|
||||
*/
|
||||
public static String slash(String self, String replacement) {
|
||||
return compile("\\s*[\\\\/]+\\s*", UNICODE_CHARACTER_CLASS).matcher(self).replaceAll(replacement);
|
||||
}
|
||||
|
||||
/**
|
||||
* Upper-case all initials.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user