$ cat /usr/share/dict/words | egrep '^\w{13,}$' | egrep -iv '(\w).*\1'This is the most straightforward approach: first regexp limits dictionary file to words with thirteen or more characters, second regexp discards any words that have a letter repeated. (Bonus challenge: Try doing it in a single regexp!)
by David Winterbottom (codeinthehole.com)
from All commands http://ift.tt/1sKg2PG
No comments:
Post a Comment