# Capitalized word before a bracket

**URL:** https://community.mp3tag.de/t/capitalized-word-before-a-bracket/56168
**Category:** General Discussion
**Created:** [February 1, 2022, 8:40pm UTC](https://community.mp3tag.de/t/capitalized-word-before-a-bracket/56168 "2022-02-01T20:40:33Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Digiland](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@Digiland](https://community.mp3tag.de/u/Digiland)
#### Post date: [February 1, 2022, 8:40pm UTC](https://community.mp3tag.de/t/capitalized-word-before-a-bracket/56168/1 "2022-02-01T20:40:33Z")

</div>

Hi,  
I’m using an action to obtain proper English capitalization. It works well but…  
I need to capitalize the word at the end of titles (before the bracket)  
here an example:  
Artist Name - Title is a Fantasy to (feat. Someone)  
must be  
Artist Name - Title is a Fantasy To (feat. Someone)  
So, the word before the bracket must be always capitalized even if the word “to” need to be lowercase (following the English capitalization rules)  
Someone can help me?  
Apologize for my bad English explanation.

---

<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: [February 1, 2022, 8:46pm UTC](https://community.mp3tag.de/t/capitalized-word-before-a-bracket/56168/2 "2022-02-01T20:46:24Z")

</div>

you could try:  
`$regexp('Title is a Fantasy to (feat. Someone)','(.*) (\l\w+) (\(.*)',$1 \u$2 $3)`

---

<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: [February 1, 2022, 8:56pm UTC](https://community.mp3tag.de/t/capitalized-word-before-a-bracket/56168/4 "2022-02-01T20:56:25Z")

</div>

Then replace the string constant

> [@ohrenkino](#):
>
> Title is a Fantasy to (feat. Someone)

with the respective field variable. Is it %title%?

---

<div class="post-metadata">

### Author: ![Digiland](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@Digiland](https://community.mp3tag.de/u/Digiland)
#### Post date: [February 1, 2022, 9:09pm UTC](https://community.mp3tag.de/t/capitalized-word-before-a-bracket/56168/5 "2022-02-01T21:09:24Z")

</div>

The variable is %title%  
Maybe I wrong somewhere because won’t work  
I am a newbie… apologize.  
Which action I have to use?

---

<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: [February 1, 2022, 9:10pm UTC](https://community.mp3tag.de/t/capitalized-word-before-a-bracket/56168/6 "2022-02-01T21:10:27Z")

</div>

Which one did you use?  
You can use Converter\>Tag-Tag or "Format value" for the intended field.

---

<div class="post-metadata">

### Author: ![Digiland](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@Digiland](https://community.mp3tag.de/u/Digiland)
#### Post date: [February 1, 2022, 9:18pm UTC](https://community.mp3tag.de/t/capitalized-word-before-a-bracket/56168/7 "2022-02-01T21:18:18Z")

</div>

I'm using "Format Value"  
Field: TITLE  
String format: ','(._) (\l\w+) ((._)',$1 \u$2 $3)

I do something wrong, I receive a Syntax Error

---

<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: [February 1, 2022, 9:20pm UTC](https://community.mp3tag.de/t/capitalized-word-before-a-bracket/56168/8 "2022-02-01T21:20:18Z")

</div>

> [@Digiland](#):
>
> String format: ','(._) (\l\w+) ((._)',$1 \u$2 $3)

This is invalid syntax.  
Format string: `$regexp(%title%,'(.*) (\l\w+) (\(.*)',$1 \u$2 $3)`

Better try Converter\>Tag-Tag to see whether the syntax is correct. That function has a preview.

---

<div class="post-metadata">

### Author: ![Digiland](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/ac8455/32.png) [@Digiland](https://community.mp3tag.de/u/Digiland)
#### Post date: [February 1, 2022, 9:23pm UTC](https://community.mp3tag.de/t/capitalized-word-before-a-bracket/56168/9 "2022-02-01T21:23:14Z")

</div>

Ohh now I understood!! This is perfect!!  
THANK YOU very much!!!

---

<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: [March 3, 2022, 9:23pm UTC](https://community.mp3tag.de/t/capitalized-word-before-a-bracket/56168/10 "2022-03-03T21:23:23Z")

</div>

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