Here is my regular expression:
((GO)( [A-Z])+)
I want every letter to appear at most once, unfortunately it isn't working properly, because this input:
GO A B C C
return true, but should return false.
You can use this regex:
^(GO(?: ([A-Z])(?!.*\2))+)$