Regex Tuesday Challenge - Week Fifteen

This challenge, also suggested by /u/a-t-k (as was last weeks), is to match musical chord names such as Cmin, Bmaj. You should match both the long and short forms, and you can find an explanation of the different chords here (the examples section is probably the quickest to understand). For this challenge, we will assume that E♯, B♯, F♭ and C♭ don't exist. We will also only be matching sixth and seventh chords.

Note that the sharp sign: is not a hash sign: #.

To test a regular expression on the test cases below, type it into the text input. Each test case will be marked as passed or failed respectively - you are aiming to get as many test cases as you can to pass. Note that JavaScript must be enabled for this feature to work. The regex engine used is the JavaScript regex engine; it is similar to PCRE, but with a few differences.

Test cases (0/89)

C
match
E
match
G
match
A
match
B♭
match

F♯
match

D
match
Cmaj
match
E♭M
match

Dmin
match
Fmin
match
Em
match
E♭m
match

E+
match
G+
match
B♭+
match

Aaug
match
B♭aug
match

match
B♭°
match

Edim
match
Fdim
match
C6
match
Cmaj6
match
Dmin6
match
D7
match
Ddom7
match
Fmaj7
match
Gmin7
match
C♯6
match

FM6
match
Gm7
match
C♯m6
match

Dm6
match
F+7
match
B+7
match
E♭+7
match

Eaug7
match
Aaug7
match
G♭aug7
match

match
match
G♭ø
match

Eø7
match
Fø7
match
F♯ø7
match

Z
no match
H
no match
I
no match
F♭
no match

C♭
no match

E♯
no match

B♯
no match

Imaj
no match
ZM
no match
E♯M
no match

F♭maj
no match

Jmin
no match
E♯m
no match

F♭aug
no match

J+
no match
E♯+
no match

E♯dim
no match

C♭°
no match

B♯6
no match

H6
no match
Z7
no match
C5
no match
A3
no match
Ddom8
no match
F9
no match
B2
no match
Bm♯6
no match

HM6
no match
Zm7
no match
CMaj5
no match
Am3
no match
DM8
no match
Fmin9
no match
BM2
no match
J+7
no match
E♯+7
no match

Jaug7
no match
E♯aug7
no match

Cdom6
no match
Ddom6
no match
F♭ø
no match

Fø6
no match
Fø8
no match
Congratulations, your regex passes all the test cases! Remember to share this challenge.