Hi Dave,
I'm trying to find a regex i.e. as used by GREP
to find all words in
"badugly" with each letter used only once and all are 7-letter words i.e.
they are all anagrams
I tend to use egrep(1), as that's what my ~/bin/g runs, but sticking
with grep and its Basic Regular Expressions, as asked, I'd use
$ grep -v '[^badugly]' /usr/share/dict/words |
grep '^.\{7\}$' |
grep -v '\(.\).*\1'
ladybug
$
Note that uses my locale.
Section 9 of POSIX has the detail,
https://pubs.opengroup.org/onlinepubs/9699919799/.
I'll guess that it involves some obscure use of
"{}*\" etc, which I've
never really grokked...
If you want it explained on the list, let me know.
--
Cheers, Ralph.