INTERACT FORUM

More => Old Versions => JRiver Media Center 18 for Windows => Topic started by: wnossel on August 13, 2012, 07:27:48 pm

Title: Change to lowercase letter after apostrophe in first word (with Regex maybe?)
Post by: wnossel on August 13, 2012, 07:27:48 pm
My goal is to identify all songs with names containing an upper case letter following an apostrophe and to change this upper case letter into lower case.
For example "L'Enfance de l'Art" should become "L'enfance de l'art".
Using Clean File Properties to fix the capitalization to "upper case first word only" solves the problem for all instances except those in the first word. My example becomes "L'Enfance de l'art), properly fixing the second problem but missing the first one.

Now, a regular expression function like Regex([Name],/#^(.*)'([A-Z])(.*)#/,0,1) identifies the candidates for change.
However, I don't know how to tweak it in order to solve my problem. When referring to the second bracketed expression ([A-Z]), is there a way to make it lowercase? I tried using \l like in
=If(Regex([Name],/#^(.*)'([A-Z])(.*)#/,0,1),[R1]'\l[R2][R3],"")
but it does not work.

Any ideas or workarounds would be much appreciated. W.
Title: Re: Change to lowercase letter after apostrophe in first word (with Regex maybe?)
Post by: MrC on August 13, 2012, 07:55:11 pm
if(Regex([Name], /#^(.*')([A-Z])(.*)$#/,0,1), [R1]FixCase([R2],4)[R3], [Name])