Also, nun geht es darum, Akkorde im Text zu finden. Heißt:
Text:
Ich will jetzt im Array haben: Bb7, C, G#m, Fm.
Ich finde aber bei meinem momentanen Pattern
auch noch E (wegen Es war...), und seltsamerweise auch b und #.
Das erste Problem (mit dem E) liegt daran, dass er E als Akkord erkennt und ignoriert, dass danach noch ein Buchstabe kommt... Müsste man dann vielleicht ans Pattern anhängen: "[\A-Za-z]" ? Bei mir klappt das jedenfalls nicht. Weshalb er die anderen beiden Zeichen erkennt, leuchtet mir nicht ein.
Könnt ihr mir helfen?