I have a pool of characters and I want to match all the words which are anagrams of those chars or of a subset of those chars using a regular expression.
Example: given the string "ACNE" the regex should give me these results:
- ACNE [T]
- CENA [T]
- CAN [T]
- CAAN [F]
- CANEN [F]
I've tried this solution /b[acne]{1,4}/b
but it accepts multiple repetitions of single chars.
What can I do to take each char at most one time?