# Case convertion: Match \`A\` unless followed by a \`-\` \`Major\` or \`Minor\`

**URL:** https://community.mp3tag.de/t/case-convertion-match-a-unless-followed-by-a-major-or-minor/64555
**Category:** Support
**Created:** [April 30, 2024, 1:00am UTC](https://community.mp3tag.de/t/case-convertion-match-a-unless-followed-by-a-major-or-minor/64555 "2024-04-30T01:00:24Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [April 30, 2024, 3:03pm UTC](https://community.mp3tag.de/t/case-convertion-match-a-unless-followed-by-a-major-or-minor/64555/9 "2024-04-30T15:03:49Z")

</div>

If you are looking for a solution for all variants from A minor through G-Major, you could test this one:

 ![image](https://community.mp3tag.de/uploads/default/original/3X/a/6/a6398d1439cb0fc2f92f15fbad1c94328a4448a8.png)

**Action:** Replace with regular expression  
**Field:** Whatever tag you want to modify, in this example it is the TITLE tag  
**Regular expression: (1)**  
`([a-g])[\s-](m(aj|in)or)`  
**Replace matches with: (2)**  
`$upper($1)-M$lower($3)or`

* * *

Explanation for **(1)**  
 ![image](https://community.mp3tag.de/uploads/default/original/3X/4/b/4b26f63081744f8d50225c315355a8ee1aaad768.png)

* * *

Explanation for **(2)**  
Write content of $1 in UPPERCASE (\<- The letter A through G)  
followed by a hyphen and the letter M  
Write content of $3 in lowercase (\<- either `aj` or `in`)  
followed by the letters o and r

If you don't like the hyphen in the end result, just let it out in the replacement string  
`$upper($1) M$lower($3)or`

---

_[View the full topic](https://community.mp3tag.de/t/case-convertion-match-a-unless-followed-by-a-major-or-minor/64555)._
