1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-25 01:08:52 -05:00

simplify regex

This commit is contained in:
Reinhard Pointner 2016-01-08 14:28:31 +00:00
parent 098e5c5e6f
commit cba56ff053

View File

@ -565,7 +565,7 @@ public final class FileUtilities {
/** /**
* Invalid file name characters: \, /, :, *, ?, ", <, >, |, \r, \n and excessive characters * Invalid file name characters: \, /, :, *, ?, ", <, >, |, \r, \n and excessive characters
*/ */
public static final Pattern ILLEGAL_CHARACTERS = Pattern.compile("[\\\\/:*?\"<>|\\r\\n]|\\p{Cntrl}|[ ]+$|(?<=[^.])[.]+$|(?<=.{250})(.+)(?=[.]\\p{Alnum}{3}$)"); public static final Pattern ILLEGAL_CHARACTERS = Pattern.compile("[\\\\/:*?\"<>|\\r\\n]|\\p{Cntrl}|\\s+$|(?<=[^.])[.]+$|(?<=.{250})(.+)(?=[.]\\p{Alnum}{3}$)");
/** /**
* Strip file name of invalid characters * Strip file name of invalid characters