I have this regex:
([abc])(?!\1)([abc])(?!\2|\1)([abc])
to find any permutation of "abc" (abc, acb, bac, bca, cab, and cba) in a given string such as:
aabbccabcabbccaassbbsdddbbsbdbabc
That regex is working well, but now I need another regex to do the same but with all the permutations without repetition of "abbc" (12 combinations)
I need to find 4 characters in a string that have one "a", two "b" and one "c". No matter the order but have to be consecutive. (abbc, babc, bbca...)
My question is different than the one suggested because it has one character that has to be repeated 2 times
1. Find [abc]
2. Find "a" or "c" if it is not in 1.
Find "b"
3. Find "a" or "c" if it doesn't appear in 1. or 2.
Find "b" if it is not alreday 2 times
4. Find "a" or "c" if it doesn't appear in 1. or 2 or 3.
Find "b" if it is not alreday 2 times