# regular expression: capitalize letter after certain char

**URL:** https://community.mp3tag.de/t/regular-expression-capitalize-letter-after-certain-char/11577
**Category:** Support
**Created:** [February 12, 2011, 6:45am UTC](https://community.mp3tag.de/t/regular-expression-capitalize-letter-after-certain-char/11577 "2011-02-12T06:45:30Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![M.A.X](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/b9bd4f/32.png) [@M.A.X](https://community.mp3tag.de/u/M.A.X)
#### Post date: [February 12, 2011, 6:45am UTC](https://community.mp3tag.de/t/regular-expression-capitalize-letter-after-certain-char/11577/1 "2011-02-12T06:45:30Z")

</div>

Hey guys,

I'm in the process of trying to teach myself regular expressions and I ran into some trouble and can't seem to resolve.

I have an Artist tag of this format:  
blah «blah«

I would like to capitalize the first letter of the second blah (which is surrounded by « chars). For example if my tag is VIA «raccoons« I want it to become VIA «Raccoons«

So put simply, I'm trying to reference the first letter that follows the character '«' and capitalize it.

I tried the following regular expression:  
Regular expression: »(.?)([\w]+)  
Replace with: $caps3($1)$2

So what I (think) the above is saying is: after the '»' character, match any single character (repeat this zero or one times only), then for a second reference match any character. For the replacement, capitalize the first match ($1) and leave the second match untouched. As you can see, this regular expression stuff has got me rather confused, don't even know what's up or down anymore 😛

Thanks in advance for the help!

Max

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [February 12, 2011, 8:22am UTC](https://community.mp3tag.de/t/regular-expression-capitalize-letter-after-certain-char/11577/2 "2011-02-12T08:22:23Z")

</div>

Please check if you need » or «

Regular expression: «(.?)(\w+)  
Replace with: «$caps3($1)$2

or

Regular expression: «(\l)  
Replace with: «$caps3($1)  
[x] case-sensitive comparison

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [February 12, 2011, 11:10am UTC](https://community.mp3tag.de/t/regular-expression-capitalize-letter-after-certain-char/11577/3 "2011-02-12T11:10:29Z")

</div>

i don't know if it fits all your cases, but for the example above, the following would be less complicated:

Action: Format Value  
Field: FIELDNAME  
Formatstring: $caps2(%fieldname%,«)

Please replace FIELDNAME/%fieldname% with the name of the field you are talking about.

---

<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:22pm UTC](https://community.mp3tag.de/t/regular-expression-capitalize-letter-after-certain-char/11577/4 "2026-02-09T12:22:54Z")

</div>


