If you are looking for a solution for all variants from A minor through G-Major, you could test this one:
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)

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
