1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

* trim spaces characters properly

This commit is contained in:
Reinhard Pointner 2012-02-16 02:42:27 +00:00
parent f1c2b9fe91
commit 2fa9b625fa

View File

@ -50,7 +50,7 @@ String.metaClass.replaceAll = { String pattern -> replaceAll(pattern, "") }
*
* e.g. "Doctor Who" -> "Doctor_Who"
*/
String.metaClass.space = { replacement -> replaceAll(/[:?._\s]+/, replacement) }
String.metaClass.space = { replacement -> replaceAll(/[:?._]/, " ").trim().replaceAll(/\s+/, replacement) }
/**