diff --git a/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy b/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy index 89a0eceb..7e1c7c37 100644 --- a/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy +++ b/source/net/sourceforge/filebot/format/ExpressionFormat.lib.groovy @@ -61,7 +61,7 @@ String.metaClass.space = { replacement -> replaceAll(/[:?._]/, " ").trim().repla * * e.g. "The Day a new Demon was born" -> "The Day A New Demon Was Born" */ -String.metaClass.upperInitial = { replaceAll(/\b[a-z]/, { it.toUpperCase() }) } +String.metaClass.upperInitial = { replaceAll(/(?<=[&()+.,-;<=>?\[\]_{|}~ ]|^)[a-z]/, { it.toUpperCase() }) } /**