# Last word of title capitalized (e.g of-\>Of)

**URL:** https://community.mp3tag.de/t/last-word-of-title-capitalized-e-g-of-of/7760
**Category:** Support
**Created:** [January 13, 2009, 2:16am UTC](https://community.mp3tag.de/t/last-word-of-title-capitalized-e-g-of-of/7760 "2009-01-13T02:16:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Styles](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@Styles](https://community.mp3tag.de/u/Styles)
#### Post date: [January 13, 2009, 2:16am UTC](https://community.mp3tag.de/t/last-word-of-title-capitalized-e-g-of-of/7760/1 "2009-01-13T02:16:03Z")

</div>

Hi!

I've made a simple action script that capitalizes titles the way I want them, by making some words lower case (like "of", "the", "in" and so on). I have a problem though, and the best way is to give an example:

_Original title_: Stuck In A Moment You Can't Get Out Of  
_What I want_: Stuck in a Moment You Can't Get Out **Of**  
_What my script does_: Stuck in a Moment You Can't Get Out **of**

Is there a way - probably by RegEx (?) - that will always capitalize the last word of the title? I'm able to do this to the first word in the title, but haven't figured how to do the same for the last one.

Finally, thanks for a magnificent piece of software!

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [January 13, 2009, 8:14am UTC](https://community.mp3tag.de/t/last-word-of-title-capitalized-e-g-of-of/7760/2 "2009-01-13T08:14:45Z")

</div>

Can you try something like this:

_Action type:_ **Replace with regular expression**  
_Field:_ **TITLE**  
_Regular expression:_ **(.\*) (.+$)**  
_Replace matches with:_ **$1 $caps($2)**

[] case-sensitive comparison

---

<div class="post-metadata">

### Author: ![Styles](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@Styles](https://community.mp3tag.de/u/Styles)
#### Post date: [January 13, 2009, 1:28pm UTC](https://community.mp3tag.de/t/last-word-of-title-capitalized-e-g-of-of/7760/3 "2009-01-13T13:28:37Z")

</div>

That works like a charm! Thanks for the fast reply 🙂 Guess I should study up on regular expressions, hadn't even heard about it before I was introduced to Mp3tag.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [January 13, 2009, 1:30pm UTC](https://community.mp3tag.de/t/last-word-of-title-capitalized-e-g-of-of/7760/4 "2009-01-13T13:30:32Z")

</div>

Yeah, they're quite powerful but unfortunately not the most intuitive part of Mp3tag 🙂

Glad that it works!

---

<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:21pm UTC](https://community.mp3tag.de/t/last-word-of-title-capitalized-e-g-of-of/7760/5 "2026-02-09T12:21:19Z")

</div>


