Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^(?![EB]#)[A-G](\#|b)?
/
gm

Description

regex that identifies music notes written with A, B, ..., A#, C#, ... Ab, Bb, ... notation.

Submitted by anonymous - 9 years ago