Using Shiny and
regex to solve Wordle
Software engineer Josh Wardle knew that his partner, Palak Shah, loved word games, and, bored during the pandemic, decided to create one for her as a kind gesture. You might have heard of it: Wordle. After months of playing it as a family, Wardle released the game to the public in October. It had more than 2.7 million players last Monday.
The game is more popular than ever right now. Pachá
added something clever to it. (Whether he created it to help her partner is unknown to me.) He made a Shiny app that uses the power of regular expression to match the words from the English dictionary with colour clues.
It takes the correct letters from user inputs and subsets an English dictionary based on words with green letters. It further subsets those which have yellow letters. Finally, it eliminates the words which have grey letters. Voila!