I want to create a regex that matches the following lines:
A string with all or some of the four characters "A", "B", "C" and "D"
"ABCD" can be performed in any position no more than once. For example, the following is expected:
A,AB,CABD,DC,BDCA,ABC,...
The following should not match:
ABA,BB,ABCC,DDAA,AACD...
Do you have any suggestions for me?
source share