# Capitalizing names with Mc/Mac

**URL:** https://community.mp3tag.de/t/capitalizing-names-with-mc-mac/13838
**Category:** Support
**Created:** [September 4, 2012, 1:45pm UTC](https://community.mp3tag.de/t/capitalizing-names-with-mc-mac/13838 "2012-09-04T13:45:13Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Moshi](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@Moshi](https://community.mp3tag.de/u/Moshi)
#### Post date: [September 4, 2012, 1:45pm UTC](https://community.mp3tag.de/t/capitalizing-names-with-mc-mac/13838/1 "2012-09-04T13:45:13Z")

</div>

I was sure there was once topic about this already and I searched the forum, couldn't find it...

So now I'm asking here. I got this action from this forum for renaming names from, for example, Mcdonalds to proper McDonalds. Action is this:

Replace with regular expression

Regular expression  
\bMc(?=.)

Replace with  
Mc$upper($1)

But i was trying this action today and it's not working, tried to fix it by myself and gave up.

So what is wrong with it?

---

<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: [September 4, 2012, 1:59pm UTC](https://community.mp3tag.de/t/capitalizing-names-with-mc-mac/13838/2 "2012-09-04T13:59:25Z")

</div>

Use this expression **\bMc(\l)**

---

<div class="post-metadata">

### Author: ![Moshi](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@Moshi](https://community.mp3tag.de/u/Moshi)
#### Post date: [September 4, 2012, 2:10pm UTC](https://community.mp3tag.de/t/capitalizing-names-with-mc-mac/13838/3 "2012-09-04T14:10:08Z")

</div>

Ah, it works! Thank you!

---

<div class="post-metadata">

### Author: ![paradajz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/dec6dc/32.png) [@paradajz](https://community.mp3tag.de/u/paradajz)
#### Post date: [September 4, 2012, 2:23pm UTC](https://community.mp3tag.de/t/capitalizing-names-with-mc-mac/13838/4 "2012-09-04T14:23:30Z")

</div>

> [@dano](#):
>
> Use this expression **\bMc(\l)**

Could you please explain how that works?

I've removed \b since some artists begin with Mc, in which case that wouldn't work, so:

Mc(\l)

and replace with

Mc$upper($1)

Since \l is in brackets, it is grouped and you can acces it by calling $1. Very well. What if I want to capitalise every letter after Mc? Or two? Does \l mean one character only? Putting dot inside brackets instead of \l makes no difference.

---

<div class="post-metadata">

### Author: ![HansBKK](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/5daacb/32.png) [@HansBKK](https://community.mp3tag.de/u/HansBKK)
#### Post date: [September 9, 2012, 12:51am UTC](https://community.mp3tag.de/t/capitalizing-names-with-mc-mac/13838/5 "2012-09-09T00:51:08Z")

</div>

> [@paradajz](#):
>
> Could you please explain how that works?

I believe MP3Tag uses the "Boost.Regex" library, which supports both the basic and extended standardized syntax as defined by POSIX

Although many in the forum here are very generous with their time wrt regex tutoring, that is a huge topic area of which self-teaching references abound all over the intertubes, and also note really an MP3Tag-specific issue.

You can find a comprehensive reference to Perl-style regular expressions in the Perl regex [documentation](http://perldoc.perl.org/perlre.html), or read about the Boost.Regex-specific options on the Boost [documentation pages](http://www.boost.org/doc/libs/1_31_0/libs/regex/doc/syntax.html). You can also do a web search for "regular expression syntax" and find lots more, including step-by-step tutorials and learning resources, including ones that show you matchin results "live" as you change your syntax.

---

<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:24pm UTC](https://community.mp3tag.de/t/capitalizing-names-with-mc-mac/13838/6 "2026-02-09T12:24:02Z")

</div>


