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

**URL:** https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619
**Category:** General Discussion
**Created:** [June 13, 2022, 9:56am UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619 "2022-06-13T09:56:05Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![Tenth](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@Tenth](https://community.mp3tag.de/u/Tenth)
#### Post date: [June 13, 2022, 9:56am UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/1 "2022-06-13T09:56:05Z")

</div>

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 🙂

Thank you so much.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [June 13, 2022, 10:03am UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/2 "2022-06-13T10:03:16Z")

</div>

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)"

---

<div class="post-metadata">

### Author: ![bo210](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/e19adc/32.png) [@bo210](https://community.mp3tag.de/u/bo210)
#### Post date: [June 17, 2022, 10:40am UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/3 "2022-06-17T10:40:44Z")

</div>

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

(has To Fall)

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [June 17, 2022, 10:44am UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/4 "2022-06-17T10:44:11Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![bo210](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/e19adc/32.png) [@bo210](https://community.mp3tag.de/u/bo210)
#### Post date: [June 17, 2022, 10:57am UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/5 "2022-06-17T10:57:16Z")

</div>

![mp31](https://community.mp3tag.de/uploads/default/original/2X/4/44926850905c3c8eb488ceac100daedd414bcc78.jpeg)

here we go!

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [June 17, 2022, 11:08am UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/6 "2022-06-17T11:08:35Z")

</div>

you are missing the parameter to set the word separators:

> [@ohrenkino](#):
>
> `fall)','(')`

---

<div class="post-metadata">

### Author: ![bo210](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/e19adc/32.png) [@bo210](https://community.mp3tag.de/u/bo210)
#### Post date: [June 17, 2022, 11:19am UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/7 "2022-06-17T11:19:58Z")

</div>

I am really sorry, I can't figure this out 🙂

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

Cheers

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [June 17, 2022, 11:27am UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/8 "2022-06-17T11:27:40Z")

</div>

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

---

<div class="post-metadata">

### Author: ![bo210](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/e19adc/32.png) [@bo210](https://community.mp3tag.de/u/bo210)
#### Post date: [June 17, 2022, 11:52am UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/9 "2022-06-17T11:52:19Z")

</div>

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

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

now, I'm getting this ☹  
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?

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [June 17, 2022, 12:00pm UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/10 "2022-06-17T12:00:38Z")

</div>

Yeah, as you gave

> [@Tenth](#):
>
> ABBA - The Winner Takes It All (has To Fall) ,

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

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

---

<div class="post-metadata">

### Author: ![bo210](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/e19adc/32.png) [@bo210](https://community.mp3tag.de/u/bo210)
#### Post date: [June 17, 2022, 12:10pm UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/11 "2022-06-17T12:10:51Z")

</div>

yeah ... finally !!!

thank you so much for your patience and time 🙂

---

<div class="post-metadata">

### Author: ![wotu2](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/0ea827/32.png) [@wotu2](https://community.mp3tag.de/u/wotu2)
#### Post date: [June 23, 2022, 1:27pm UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/12 "2022-06-23T13:27:23Z")

</div>

Nice to see it's fixed 🙂

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.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [June 23, 2022, 1:33pm UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/13 "2022-06-23T13:33:32Z")

</div>

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

and further information in

> **[Scripting Functions – Mp3tag Documentation](https://docs.mp3tag.de/scripting/#string-functions)**
>
> Documentation on Mp3tag's scripting functions. Mp3tag is the universal Tag Editor.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [June 23, 2022, 1:38pm UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/14 "2022-06-23T13:38:33Z")

</div>

> [@wotu2](#):
>
> Should be like this:  
> **BEATLES - Back In The U.S.S.R (How Lucky You Are)**

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.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [June 23, 2022, 1:40pm UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/15 "2022-06-23T13:40:14Z")

</div>

> [@Tenth](#):
>
> `$regexp($upper(%artist%),'(?#From "The Artist" to "Artist")^(?i)(?:the|der|die|das)\s+',) - $caps(%title%)`

I assumed that this was the originally used code.

---

<div class="post-metadata">

### Author: ![wotu2](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/0ea827/32.png) [@wotu2](https://community.mp3tag.de/u/wotu2)
#### Post date: [June 23, 2022, 1:41pm UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/16 "2022-06-23T13:41:53Z")

</div>

That did it 😉

THANK YOU !

---

<div class="post-metadata">

### Author: ![wotu2](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/0ea827/32.png) [@wotu2](https://community.mp3tag.de/u/wotu2)
#### Post date: [June 23, 2022, 1:45pm UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/17 "2022-06-23T13:45:35Z")

</div>

Yes, exactly ..... brilliant 🙂

---

<div class="post-metadata">

### Author: ![wotu2](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/w/0ea827/32.png) [@wotu2](https://community.mp3tag.de/u/wotu2)
#### Post date: [June 23, 2022, 1:48pm UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/18 "2022-06-23T13:48:08Z")

</div>

@ LyricsLover

see [ohrenkino]'s last post.  
thank you

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [July 23, 2022, 1:48pm UTC](https://community.mp3tag.de/t/how-do-i-capitalize-the-words-of-the-subtitle-in-the-brackets/57619/19 "2022-07-23T13:48:38Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
