In the NYTimes Spelling Bee game, you have to make words (4+ letters long) using a set of 7 letters, one of which must be used in the word. This is fairly trivial to make a regex for:
grep -i '^[bluntam]{4,}$' /usr/share/dict/words | grep -i 'u'
Is there a way to combine these into one fancy regex? The issue with putting the required letter in the center, like [bluntam]*u[bluntam]*
is that there needs to be another filter to ensure the word length. I’m ok with using PCRE or any other standard bash tools.