Immediate confession ... this is a Scrabble-related question of low importance ! And it's a pure regex question, but I've found the Perl Monks are the best for these things, just as Perl regex is certainly the best, I always use it, even from the command line.
I'd like to search a list of words (a dictionary list) to find those I can make with my letters. So, if I have AABCDEF I'd like to find all words with 1 to 7 of those letters in. I need a regexp like AABCDEF{1,7} but which only allows each letter to occur once, to mimic the fact that you have only one physical tablet per letter (stating the obvious here but, the plainer the context the better).
I hope this isn't obvious. I can't think of an option that does it, and intuitively that once-only using up of tokens is a counting thing quite alien to regex's pattern matching. But you never know.
ATdhvaannkcse, Greg E
In reply to Regex question once-only use of chars in a charset by gje21c
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |