#1 2019-11-27 15:04

andrew_d1
Member
Registered: 2019-11-27
Posts: 2

Capitalizing before and after a symbol

Hi everybody, I need to rename a lot of mp3's in order to capitalize the first letter of the artist name and the first word of the title.
Is there a way to set a rule to capitalize everything before the "-" sign and only the first word after that sign?

IE : "Depeche Mode - Enjoy The Silence" would turn into "Depeche Mode - Enjoy the silence"

Thanx a lot

Last edited by andrew_d1 (2019-11-27 15:32)

Offline

#2 2019-11-27 19:47

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Capitalizing before and after a symbol

These rules will do the job:

1) Case: Capitalize every word (skip extension)
2) Regular Expressions: Replace expression " - (\w)(.+)\Z" with " - \U$1\L$2" (skip extension)

Input:
depeche mode - Enjoy The Silence.mp3

Output:
Depeche Mode - Enjoy the silence.mp3

See the Regular Expressions documentation for additional information:
Regular_Expressions#Upper_case_and_lower_case_manipulations

Last edited by den4b (2019-11-27 19:48)

Offline

#3 2019-11-29 15:04

andrew_d1
Member
Registered: 2019-11-27
Posts: 2

Re: Capitalizing before and after a symbol

it worked like a charm!
thanks a lot!

Offline

Board footer

Powered by FluxBB