# Merging two tag rules into one. Is it possible?

**URL:** https://community.mp3tag.de/t/merging-two-tag-rules-into-one-is-it-possible/5635
**Category:** General Discussion
**Created:** [October 23, 2007, 2:34pm UTC](https://community.mp3tag.de/t/merging-two-tag-rules-into-one-is-it-possible/5635 "2007-10-23T14:34:19Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Harakiri](https://community.mp3tag.de/user_avatar/community.mp3tag.de/harakiri/32/142_2.png) [@Harakiri](https://community.mp3tag.de/u/Harakiri)
#### Post date: [October 23, 2007, 2:34pm UTC](https://community.mp3tag.de/t/merging-two-tag-rules-into-one-is-it-possible/5635/1 "2007-10-23T14:34:19Z")

</div>

Hello fellow mp3tag users and respected developers!

First of all, i'd like to congratulate all of you for making this tool one of the most effective that i've found and use frequently.  
Through all this years using mp3tag i've managed to perfect my method of "tagging" and replacing filenames or folders but one little problem remais. My lack of skills to tweak some tag rules.

Thus i have got this two tags that i would like to know if it's possible to "merge" into one effectively:

The first one consists of changing the TITLE field's first letter into UPPER case. Simple task, nothing complex here.

The second rule consists of changing the TITLE field's first letter into UPPER case ignoring what's inside parentheses.

[I.E.: Röyksopp - Beautiful DAY withOUT yoU (Rex The Dog remix) -\> Röyksopp - Beautiful day without you (Rex The Dog remix)]

Basically when i want to apply both rules to all the tracks of one album i have to select all the tracks wich titles doesn't contain parentheses and then invert the selection and apply the second rule above mentioned. It's a tedious process and i want to know if there's a way to shorten it!?

I hope i've made this text understandable.

I'll show the second tag script so that you understand how it works:

Action -\> Replace by regular expression

Regular expression -\> `^(.*)(\(.*\))`

Replace to -\> `$caps3($1)$2`

Best regards,

---

<div class="post-metadata">

### Author: ![ffolke](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/8edcca/32.png) [@ffolke](https://community.mp3tag.de/u/ffolke)
#### Post date: [October 29, 2007, 11:02am UTC](https://community.mp3tag.de/t/merging-two-tag-rules-into-one-is-it-possible/5635/2 "2007-10-29T11:02:02Z")

</div>

I've just started playing with regular expressions, but I got this to work. It satisfies both titles (with and without paranthesis), retaining whatever occurs after '('

Röyksopp - Beautiful DAY withOUT yoU -\> Röyksopp - beautiful day without you  
Röyksopp - Beautiful DAY withOUT yoU (Rex The Dog remix) -\> Röyksopp - beautiful day without you (Rex The Dog remix)

Action type: Replace with regular expression  
Field: TITLE  
Regular expression: `^(.*?)(\(|$)`  
Replace matches with: `$caps3($1)$2`  
[] case-sensitive comparison

If there are any improvements, shout it out.

---

<div class="post-metadata">

### Author: ![Harakiri](https://community.mp3tag.de/user_avatar/community.mp3tag.de/harakiri/32/142_2.png) [@Harakiri](https://community.mp3tag.de/u/Harakiri)
#### Post date: [October 29, 2007, 11:11am UTC](https://community.mp3tag.de/t/merging-two-tag-rules-into-one-is-it-possible/5635/3 "2007-10-29T11:11:32Z")

</div>

Just tried and that is EXACTLY what i was looking for a long time! 🙂

Thanks for your patience ffolke! You just made a happy man today! 🙂

---

<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: [May 19, 2020, 8:21am UTC](https://community.mp3tag.de/t/merging-two-tag-rules-into-one-is-it-possible/5635/4 "2020-05-19T08:21:48Z")

</div>

5 posts were split to a new topic: [Trying to remove leading track numbers](https://community.mp3tag.de/t/trying-to-remove-leading-track-numbers/49006)

---

<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: [May 19, 2020, 8:22am UTC](https://community.mp3tag.de/t/merging-two-tag-rules-into-one-is-it-possible/5635/5 "2020-05-19T08:22:10Z")

</div>


