I'm having trouble figuring out what's wrong with my regex for a string that can be any length but always follows the pattern below
"(A,B)" = valid
"(A,B) (B,C)" = valid
Basically, parenthesis "(", A-Z letter, comma, A-Z letter, parenthesis ")", a white space if and only if there the sequence begins again, otherwise no whitespace.
So far I've gotten to "^\\([A-Z]?,[A-Z]?\\)*.\\([A-Z]?,[A-Z]?\\).*$" but I'm not sure what about my regex is not working right.