# How to adjust this Regexp for capitalization?

**URL:** https://community.mp3tag.de/t/how-to-adjust-this-regexp-for-capitalization/18722
**Category:** Support
**Created:** [February 19, 2017, 12:52am UTC](https://community.mp3tag.de/t/how-to-adjust-this-regexp-for-capitalization/18722 "2017-02-19T00:52:16Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Johan\_A\_M](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/73ab20/32.png) [@Johan\_A\_M](https://community.mp3tag.de/u/Johan_A_M)
#### Post date: [February 19, 2017, 12:52am UTC](https://community.mp3tag.de/t/how-to-adjust-this-regexp-for-capitalization/18722/1 "2017-02-19T00:52:16Z")

</div>

Hi,

I'm using this Regexp to get a more natural capitalization. The only problem is that words in teh beginning of a parenthesis should be capitalized, even if they're in this list. The typocal example would be _Artist - Title (the Blah Blah Remix)_ where of course the "the" should be capitalized.

I have absolutely no knowledge in these scripting but would very much appreciate any help!

/J

> [@Regular Expressions](https://community.mp3tag.de/t/regular-expressions/521/1):
>
> Script to fix capitalization according to English rules only in tags. This is my n-th attempt to do this, but I think it works quite nice... Of course some human work is needed because it doesn't contain corpus to check it according to its POS.
> 
> Or directly in mp3tag:  
> **Case conversion**  
> _Field_ \_TAG  
> _Case conversion_ Mixed Case  
> _Words begin..._
> 
> **Replace with regular expression**  
> _Field_ \_TAG  
> _Regular expression_ \b(A|An|The|And|But|Or|So|After|Before|Out|When|While|Since|Until|Although|E  
> ven If|Because|About|Above|Across|Against|Along|Alongside|As|At|Below|By|During|For|  
> From|In|Into|Of|Off|On|Onto|Over|Than|Through|Till|To|Under|Up|With|Within|Witho  
> u  
> t)\b  
> _Replace matches with_ $lower($1)
> 
> **Replace with regular expression**  
> _Field_ \_TAG  
> _Regular expression_ ^\s\*(\w+)  
> _Replace matches with_ $caps($1)
> 
> **Replace with regular expression**  
> _Field_ \_TAG  
> _Regular expression_ (\w+)\s\*$  
> _Replace matches with_ $caps($1)

---

<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 19, 2017, 7:58am UTC](https://community.mp3tag.de/t/how-to-adjust-this-regexp-for-capitalization/18722/2 "2017-02-19T07:58:44Z")

</div>

If you are not satisfied with the result of the action that you described in the OP, then add another action of the type "Tag Conversion" and enter the "(" for characters that denote a word boundary .  
You have to enter all characters that do this, including space, comma, full stop etc.

---

<div class="post-metadata">

### Author: ![Johan\_A\_M](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/73ab20/32.png) [@Johan\_A\_M](https://community.mp3tag.de/u/Johan_A_M)
#### Post date: [February 19, 2017, 9:21am UTC](https://community.mp3tag.de/t/how-to-adjust-this-regexp-for-capitalization/18722/3 "2017-02-19T09:21:52Z")

</div>

Thank you @ohrenkino for answering! Iäm not sure I completely understand. Do you mean a "Case conversion" or a Regexp in the \_TAG?

---

<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 19, 2017, 11:38am UTC](https://community.mp3tag.de/t/how-to-adjust-this-regexp-for-capitalization/18722/4 "2017-02-19T11:38:38Z")

</div>

> [@Johan\_A\_M](#):
>
> Thank you @ohrenkino for answering! Iäm not sure I completely understand. Do you mean a "Case conversion" or a Regexp in the \_TAG?

I would never apply such an action to \_TAG but always only to specific fields.

In general: such a regular expression gets a capital letter following a bracket in TITLE:  
$regexp(%title%,'((.)','('\u$1)

Band names often do not use a lower-case article, so applying the action to the global tag produces just as many errors as it produces hits.  
Examples:

Mott The Hoople  
Kissing The Pink  
Sounds From The Ground

So I would limit such an action to the specific fields like TITLE or Lycrics.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [February 19, 2017, 11:38am UTC](https://community.mp3tag.de/t/how-to-adjust-this-regexp-for-capitalization/18722/5 "2017-02-19T11:38:53Z")

</div>

> [@Johan\_A\_M](#):
>
> ... problem is that words in teh beginning of a parenthesis should be capitalized ...

You have to adapt Step 1 from the given proposal by user "Juozas V" to your own needs.  
In the first action "Case conversion" you have to define one or more character/s within the edit field "Words begin from/after any of:", which should be uppercased.  
In your case this will be the one character for the "open round bracket".  
Within this edit field there can be defined more than one "trigger character".

You are still using Mp3tag Version 2.65a?  
Consider updating to version 2.81.

DD.20170219.1338.CET

---

<div class="post-metadata">

### Author: ![Johan\_A\_M](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/73ab20/32.png) [@Johan\_A\_M](https://community.mp3tag.de/u/Johan_A_M)
#### Post date: [February 19, 2017, 4:17pm UTC](https://community.mp3tag.de/t/how-to-adjust-this-regexp-for-capitalization/18722/6 "2017-02-19T16:17:19Z")

</div>

Thank you both for your answers, I will have a look at this later today.

---

<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: [February 9, 2026, 12:26pm UTC](https://community.mp3tag.de/t/how-to-adjust-this-regexp-for-capitalization/18722/7 "2026-02-09T12:26:41Z")

</div>


