Wordle, Oct 8, 2022
NYT Wordlebot claimed I had two choices after my 3rd guess. Let’s see if it’s correct.
I will grant that I made a bad third guess.
I solved it without using regular expressions, but I mulled over my first three guesses for quite a while before I came up with “vigor” for my fourth guess.
It’s the beginning of the month. NYT gives you 3 free accesses per month, and I used one on the Wordlebot for Wordle 476. No real surprises in what Wordlebot told me, except that there are only two possibilities after my goofy third guess. I decided to find the other word, or more likely, find out that Wordlebot was using some reduced dictionary.
Here’s my regular expression to find solutions to this puzzle.
#!/bin/bash
set -eou pipefail
grep '^.....$' /usr/share/dict/words |
tr '[A-Z]' '[a-z]' |
grep '[^canemldytus][^canemldytusor][^canemldytusr][^canemldytus][^canemldytus]' |
grep o | grep r
It finds, “bjork”, “rigor” and “vigor”. “Bjork” is a proper noun that appears in my dictionary, but probably not in the official Wordle word list, so I’ll allow this.
I dislike having to tack grep o | grep r
to the end of the pipeline,
but without it, the regular expression finds words that don’t fit:
bjork
hippo
oxbow
rigor
vigor
whiff
whoop
hippo
, oxbow
and whiff
don’t have some or all of the yellow letters in them.
Modifying the regular expression above with “alternation” to try to mandate an ‘o’ and an ‘r’ didn’t work. This gives the same 8 words:
grep '^.....$' /usr/share/dict/words |
tr '[A-Z]' '[a-z]' |
grep -E '([^canemldytus]|o|r)[^canemldytusor]([^canemldytusr]|o)([^canemldytus]|o|r)([^ca
It might be possible to use regular expression derivatives to make a better pattern, as you can do logical “and” with them.
Wordle is a fairly subtle game. The yellow letters are a surprising part of the subtlety.