Regular Expressions 101

Community Patterns

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 - 7 years ago