Created
March 2, 2013 11:01
-
-
Save lukasvermeer/5070529 to your computer and use it in GitHub Desktop.
Find words for the game 4 Pics 1 Word. Takes a bunch of letters ("elnopq" in this case) and prints four letter words that can be formed using a subset of those letters.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl -ne 'if((join "",sort split(//,lc))=~/^\s*e?l?n?o?p?q?$/&$_=~/^\w{4}$/){print $_};' /usr/share/dict/words |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ported to Groovy here: https://gist.github.com/breun/5051569