Test, validate and match regular expressions
Matches musical note names A–G with an optional sharp (#) or flat (b) accidental at the start of each line. A negative lookahead excludes E# and B#, which don't exist as sharp notes in standard Western music notation (they're enharmonically F and C). Useful for validating or extracting note names in music parsers, chord readers, or sheet-music text processing.