Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wrote a python script that use regular expressions to winnow out words based on constraints imposed by previous guesses. There are 3 parts to a regex. The first uses positive look aheads to verify the test word includes each letter that has been marked as correct but in the wrong location. These are followed by negative groups with all wrong letters indicated. Interspersed are correct letters in the correct position. This filters my word list from 5300 words to a handful with each guess. It works pretty well but it still requires guessing. I always run it after I’ve solved the word using just my brain. It gives me a good sense as to how good or bad my logic was.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: