# Roman Numerals case conversion

**URL:** https://community.mp3tag.de/t/roman-numerals-case-conversion/5520
**Category:** Support
**Created:** [October 1, 2007, 8:47am UTC](https://community.mp3tag.de/t/roman-numerals-case-conversion/5520 "2007-10-01T08:47:07Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![sminc](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/73ab20/32.png) [@sminc](https://community.mp3tag.de/u/sminc)
#### Post date: [October 1, 2007, 8:47am UTC](https://community.mp3tag.de/t/roman-numerals-case-conversion/5520/1 "2007-10-01T08:47:07Z")

</div>

I'm using the regex example to convert roman numerals to upper case but I'm having a problem with it.

For some reason it is deleting commas out of the tag / filename / directory which makes no sense as the only replace command is the $upper

The suggested regex is

> [@](#):
>
> Upper case for Roman numbers
> 
> Regular expression:  
> (^|\W)(?:M{0,3})(?:D?C{0,3}|C[DM])(?:L?X{0,3}|X[LC])(?:V?I{0,3}|I[VX])(?=(.\s|\s|)|$))  
> Replace matches with:  
> $upper($0)  
> case-sensitive comparison

Is there something in here where the comma is being selected but the $upper fails so it is being replaced with nothing ?

---

<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: [October 1, 2007, 12:01pm UTC](https://community.mp3tag.de/t/roman-numerals-case-conversion/5520/2 "2007-10-01T12:01:40Z")

</div>

The problem is when $upper gets a parameter with a comma it takes it as seperator and not as string.

If you replace at the begining (^|\W) by \b it should avoid this bug.

---

<div class="post-metadata">

### Author: ![egd](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/3da27b/32.png) [@egd](https://community.mp3tag.de/u/egd)
#### Post date: [May 9, 2008, 7:25pm UTC](https://community.mp3tag.de/t/roman-numerals-case-conversion/5520/3 "2008-05-09T19:25:57Z")

</div>

Dano, am I correct in assuming that should be replace (^|\W) with \b ?

---

<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: [May 10, 2008, 4:26am UTC](https://community.mp3tag.de/t/roman-numerals-case-conversion/5520/4 "2008-05-10T04:26:57Z")

</div>

If you write a regular expression, which contains a syntactical correct comma in the search string, within Mp3tag $regexp() function you have to escape the comma with apostrophes, because the comma is the delimiter character in Mp3tag scripting language that separates the parameters in a parameterlist.

DD.20080510.0827.CEST

---

<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: [May 10, 2008, 6:26am UTC](https://community.mp3tag.de/t/roman-numerals-case-conversion/5520/5 "2008-05-10T06:26:04Z")

</div>

egd I've updated the expression in the thread.

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [May 13, 2008, 5:27pm UTC](https://community.mp3tag.de/t/roman-numerals-case-conversion/5520/6 "2008-05-13T17:27:02Z")

</div>

> [@](#):
>
> when $upper gets a parameter with a comma it takes it as seperator and not as string.

Yuk. Especially as $upper has nothing to separate, being a single-parameter function.

Thanks for that info, Dano.

> [@](#):
>
> If you replace at the begining (^|\W) by \b it should avoid this bug.

What's \b ? Not mentioned in the Help, AFAICS.

---

<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:20pm UTC](https://community.mp3tag.de/t/roman-numerals-case-conversion/5520/7 "2026-02-09T12:20:31Z")

</div>


