How do I capitalize the words of the subtitle in the brackets?

Hi there,

I am currently using this code:
$regexp($upper(%artist%),'(?#From "The Artist" to "Artist")^(?i)(?:the|der|die|das)\s+',) - $caps(%title%)

for: ABBA - The Winner Takes It All (has To Fall) ,

but it should be this way: ABBA - The Winner Takes It All (Has To Fall)

I'd really appreciate it if someone could modify my code for this.
I've tried it in many ways, but failed so far :slight_smile:

Thank you so much.

I am not sure what the regular expression should do there if you do not reference any search result.

I would try "Format value" with
$caps2('ABBA - The Winner Takes It All (has To Fall)','(') -> "ABBA - The Winner Takes It All (Has To Fall)"

unfortunately it didn't work , the first word in the brackets is still in the lower case:

(has To Fall)

As I tried it with the string from the example and the result was as shown you now have to show, preferably with a screendump the original data and the action that you used.

here we go!

you are missing the parameter to set the word separators:

I am really sorry, I can't figure this out :slight_smile:

I'd appreciate it, if you just paste the entire code-line here.

Cheers

$caps2(%title%)
should be
$caps2(%title%,'(')

Thank you ... but there's a new problem now with the partial old problem there :slight_smile:

with this:
$regexp($upper(%artist%),'(?#From "The Artist" to "Artist")^(?i)(?:the|der|die|das)\s+',) - $caps2(%title%,'(')

now, I'm getting this :frowning:
ABBA - The winner takes it all (Has to fall)

and all I wanted to have it like this:
ABBA - The Winner Takes It All (Has To Fall)

where am I still doing it wrong?

Yeah, as you gave

as source string, all the other words where already in capitals and they were to be left alone.

So,
$caps2(%title%,'(')
becomes
$caps(%title%,'( ')

yeah ... finally !!!

thank you so much for your patience and time :slight_smile:

Nice to see it's fixed :slight_smile:

What about this:
The beatles - Back in the U.s.s.r (how Lucky You Are)

Should be like this:
BEATLES - Back In The U.S.S.R (How Lucky You Are)

What do I add to the current code or what should be the full code for this?

Thanks a lot.

$caps('The beatles - Back in the U.s.s.r (how Lucky You Are)', '('.)

and further information in

There is no automatism to convert "The beatles" into "BEATLES".
If you really want that, you have to specify a replacement with code like this
$replace(%ARTIST%,The beatles,BEATLES)

This would replace The Beatles saved in your ARTIST tag with BEATLES in the same ARTIST tag.
Please be aware, that such a replacement ist case sensitive. It would not work for an ARTIST The Beatles (with a uppercase B) until you use the $upper function.

Thanks to @ohrenkino I just realized, that you want to use it with the mentioned code.

I assumed that this was the originally used code.

1 Like

That did it :wink:

THANK YOU !

Yes, exactly ..... brilliant :slight_smile:

@ LyricsLover

see [ohrenkino]'s last post.
thank you

1 Like