I have a bunch of characters like this: A B B C D
And I have a few spaces like this: _ _ _
Is there a way to use regular expression to match any string that can be formed by "dragging" the available characters into the empty spaces?
So in the example, these are some valid matches:
A B C
A B B
B C B
D A B
But these are invalid:
A A B // Only one 'A' is available in the set
B B B // Only two 'B's are available in the set
Sorry if it has already been asked before.