Regular Expressions 101

Community Patterns

1...45678...901

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
\[([A-G][#b]?(maj|m)?[27]?(add|aug|dim|sus)?[2-9]?)\]
/
g

Description

Pattern to match ukulele chords, wrapped in square brackets. Examples: [G] [Em] [Dsus2] [Bb] [Ab7sus4]

Submitted by Kris Paulsen - 8 years ago