# Case Conversion Exceptions

**URL:** https://community.mp3tag.de/t/case-conversion-exceptions/1242
**Category:** Support
**Created:** [August 22, 2004, 10:57am UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242 "2004-08-22T10:57:33Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![new\_user](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/e19adc/32.png) [@new\_user](https://community.mp3tag.de/u/new_user)
#### Post date: [August 22, 2004, 10:57am UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/1 "2004-08-22T10:57:33Z")

</div>

Hi all,

Becoming a huge fan of this app. ![:w00t:](https://community.mp3tag.de/uploads/default/original/1X/cb01eca72fe9339ff6f3ec9f1e3c5fe002be0f0a.gif ":w00t:")  
Seems to be able to do all I need it to do. I'm currently getting all my tags in place and building up an directory structure using this filenaming

%artist%  
%year% %album%  
%artist% [%album%] $num("%track%", 2) - %title%

I have been using the default case conversion in the actions (ALT+F5) to get tags and filenames "Like This". But sometime I would prefer to have exceptions, e.g.:

Not Cd1 or Cd2 in the album name, but CD1 and CD2 instead.  
Same with romer numbers, like III, II, IV should always remain in Caps (ie not Iii, Ii or Iv).  
Not R&b but R&B.  
VA in artist for "various artists" instead of Va.

Any ideas to what would be the smartest way to go about this is warmly welcome.  
I'm sure the application can do this, just not sure if I should use "Case Conversion" or "Replace" and how to build of the exception cases.

---

<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: [August 25, 2004, 8:56am UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/2 "2004-08-25T08:56:18Z")

</div>

Simply use a Replace action with all your exceptions, e.g.:

Vii -\> VII  
R&b -\> R&b  
... and so on.

Best regards,  
~ Florian

---

<div class="post-metadata">

### Author: ![new\_user](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/e19adc/32.png) [@new\_user](https://community.mp3tag.de/u/new_user)
#### Post date: [August 28, 2004, 5:29pm UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/3 "2004-08-28T17:29:21Z")

</div>

thanks for the answer, I'll give it a go.

---

<div class="post-metadata">

### Author: ![Andreasvb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@Andreasvb](https://community.mp3tag.de/u/Andreasvb)
#### Post date: [November 20, 2004, 7:56pm UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/4 "2004-11-20T19:56:47Z")

</div>

Sorry for bringing up old topic.

I use mp3tag a lot, thanks for a great program Florian!

Tried to make a Regex for this but didn't worked.

In foobar there's a formatting called $caps2()  
It does the same as mp3tag's "mixed" but it ignores UPPERCASE letters

mp3tag: test TEST tesT \> Test Test Test  
foobar: test TEST tesT \> Test TEST TesT

Maybe you could add it in the case conversion dialog where Mixed Case is, or if it's solveable with regex.

Thanks.

---

<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: [November 21, 2004, 10:24am UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/5 "2004-11-21T10:24:21Z")

</div>

my RegEx Attempt for this:  
1 action with 2 RegEx sub-actions:

1:  
"\s([a-z])"  
" $upper($1)"

2:  
"^([a-z])"  
"$upper($1)"

without the " letters

---

<div class="post-metadata">

### Author: ![Andreasvb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@Andreasvb](https://community.mp3tag.de/u/Andreasvb)
#### Post date: [November 21, 2004, 10:53pm UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/6 "2004-11-21T22:53:38Z")

</div>

Thanks dano, that worked very good (just had to add " around $1 😉 ) ![:music:](https://community.mp3tag.de/uploads/default/original/1X/2ba05d1ade5eb0d15fc173be6f717dbe63890a70.gif ":music:")

Now I just need something to replace the "uppercase first letter from/after": (-\_.

Thanks again.

---

<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: [November 22, 2004, 11:11am UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/7 "2004-11-22T11:11:15Z")

</div>

> [@](#):
>
> Now I just need something to replace the "uppercase first letter from/after": (-\_.
> 
> \<{POST\_SNAPBACK}\>

You can do this via a simple Case conversion action.

~ Florian

---

<div class="post-metadata">

### Author: ![Andreasvb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@Andreasvb](https://community.mp3tag.de/u/Andreasvb)
#### Post date: [November 22, 2004, 4:27pm UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/8 "2004-11-22T16:27:57Z")

</div>

No, it will override the regex =(

If I first do the Mixed then TEST will be Test and then I use dano's regex on that, you get the idea.

That's why I wanted it in the dropdown menu, it's exactly like Mixed but it keeps uppercase =)

---

<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: [November 22, 2004, 4:56pm UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/9 "2004-11-22T16:56:04Z")

</div>

> [@](#):
>
> Now I just need something to replace the "uppercase first letter from/after": (-\_.

Can you give an example? I don't really understand how you mean this.

---

<div class="post-metadata">

### Author: ![Andreasvb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@Andreasvb](https://community.mp3tag.de/u/Andreasvb)
#### Post date: [November 22, 2004, 7:07pm UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/10 "2004-11-22T19:07:34Z")

</div>

Just like what you can choose in the case conversion dialog

![](http://dwi.mine.nu:81/Snags/Snap029.png)

Like that.

But if I choose that after or before your regex it will not work.

Some sort of explanation:  
I have this for example: TEST test (test)  
and I have used the regex so it becomes like this: TEST Test (test)  
Then I want to use so it uppercase after ( with the Mixed.  
Final result: Test Test (Test)

---

<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: [November 22, 2004, 7:14pm UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/11 "2004-11-22T19:14:02Z")

</div>

Well, then just make some more regular expression actions...  
like:  
.([a-z])  
.$upper($1)

-([a-z])  
-$upper($1)  
...

---

<div class="post-metadata">

### Author: ![Andreasvb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@Andreasvb](https://community.mp3tag.de/u/Andreasvb)
#### Post date: [November 22, 2004, 7:14pm UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/12 "2004-11-22T19:14:32Z")

</div>

It worked.  
I guess \ is an escape char? Like in Linux

Just had to add the damn "" around $1 =)

Thanks again

---

<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: [November 22, 2004, 8:28pm UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/13 "2004-11-22T20:28:38Z")

</div>

> [@](#):
>
> It worked.  
> I guess \ is an escape char? Like in Linux
> 
> Just had to add the damn "" around $1 =)
> 
> Thanks again
> 
> \<{POST\_SNAPBACK}\>

\ is an escape char, please look in the helpfile for further explanation and to see which chars you must escape (ALT+5-\>Help)  
sry with the "" but i have an alpha version that handles this a bit different, i forgot about it.  
$upper("$1") is right in the current downloadable versions

---

<div class="post-metadata">

### Author: ![Andreasvb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@Andreasvb](https://community.mp3tag.de/u/Andreasvb)
#### Post date: [November 23, 2004, 4:00pm UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/14 "2004-11-23T16:00:18Z")

</div>

Hi again.

I tried the new version and now none of your regex works anymore, dano.

Tried to change to yours without "" didn't worked, just get  
Original tag: Artist  
Parsed: [SYNTAX ERROR IN FORMATTING STRING]rtist

\s([a-z])  
$upper($1)

^([a-z])  
$upper($1)

Edit: should I even put single quotes around functions? Like '['a-z']'  
Didn't worked either, but now I didn't got syntax error.

---

<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: [November 23, 2004, 4:19pm UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/15 "2004-11-23T16:19:23Z")

</div>

\s([a-z])  
$upper($1)

^([a-z])  
$upper($1)

works for me.  
even without the \ in $upper  
what's the content of artist tag field, any special chars that could break this? or are you applying some other actions at the same time that are not updated maybe?

---

<div class="post-metadata">

### Author: ![Andreasvb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@Andreasvb](https://community.mp3tag.de/u/Andreasvb)
#### Post date: [November 23, 2004, 4:24pm UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/16 "2004-11-23T16:24:49Z")

</div>

In artist: Test test TEST (test) .test

with regex: [SYNTAX ERROR IN FORMATTING STRING]est Test TEST (test) .test

Haven't changed the second actions yet(the ones with uppercase after "[(-\_." )

I have these in an action:

Regular expression "ARTIST": "\s([a-z])" -\> " $upper($1)"  
Regular expression "ARTIST": "^([a-z])" -\> "$upper($1)"

---

<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: [November 23, 2004, 5:02pm UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/17 "2004-11-23T17:02:27Z")

</div>

I don't know, but can you attach (zipped or rared) the Action files (.mta files) that make these problems here so I can analyse them?

---

<div class="post-metadata">

### Author: ![Andreasvb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@Andreasvb](https://community.mp3tag.de/u/Andreasvb)
#### Post date: [November 23, 2004, 5:17pm UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/18 "2004-11-23T17:17:07Z")

</div>

Sure, here you go [http://dwi.mine.nu:81/actions.zip](http://dwi.mine.nu:81/actions.zip)

I added all actions, the one that's problem is NEW TEST [TAG] Case conversion (ARTIST).mta  
And the one with all your regex is [TAG] Case conversion (ARTIST).mta

Thanks

---

<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: [November 23, 2004, 5:26pm UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/19 "2004-11-23T17:26:07Z")

</div>

OK 😃 the problem is a simple typo

$upper($1)  
$upper($1)

do you see it?

\ must be before the ( in the second $upper

---

<div class="post-metadata">

### Author: ![Andreasvb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@Andreasvb](https://community.mp3tag.de/u/Andreasvb)
#### Post date: [November 23, 2004, 5:31pm UTC](https://community.mp3tag.de/t/case-conversion-exceptions/1242/20 "2004-11-23T17:31:18Z")

</div>

Thanks, that worked, strange that it worked in the old version though =)

Now there's only problem with the rest of the regex

This is what I get  
Test $upper+(T)est $upper+(T)EST (Test) .Test

[Next page](https://community.mp3tag.de/t/case-conversion-exceptions/1242.md?page=2)
