RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Musical Chords
Expression
^[A-G](b|#)?((m(aj)?|M|aug|dim|sus)([2-7]|9|13)?)?(\/[A-G](b|#)?)?$
Description
Play guitar or read sheet music for piano/keyboard? You've got to be familiar with chord notations. They've got to have some format that regular expressions can test.
Matches
F#maj7 B Abaug7 C#m6/A#
Non-Matches
Amajb B#sus10 Gbm/D#6
Author Rating: Not yet rated. Mickael Caruso
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: A good start
Name: Steve Blair
Date: 9/11/2013 12:37:11 PM
Comment:
I submitted a more complete/flexible chord matching algo here: http://regexlib.com/REDetails.aspx?regexp_id=3863


Title: Didn't match anything !
Name: Eric
Date: 6/5/2009 5:42:51 AM
Comment:
Good idea but it doesn't match anything except if you put a single line of well known chords...


Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials