Here's a crossword clue: Good to eat (10 letters) P-M--R---T- Got it? No? We could write a Java program to help us solve the clue. First, we're going to need a list of possible English words. [This link](https://github.com/redbo/scrabble/blob/master/dictionary.txt) takes you to a file containing all the official Scrabble words. Download it and save it as scrabble.txt. ![[scrabble.txt]] Next, we're going to write a program that scans through the file and uses a regular expression to find words of that pattern. ```java try { Scanner scan = new Scanner(new File("scrabble.txt")); while(scan.hasNext()){ String word = scan.nextLine(); if (word.matches("P.M..R...T.")) System.out.println(word); } System.out.println("Done"); } catch (FileNotFoundException e) { e.printStackTrace(); } ``` # 58008 As every 11 year old knows, if you type out 58008 on a calculator and hold it upside down it spells "Boobs" But what other words can you spell? You can use numbers to represent letters as follows * 0 = O or D * 1 = I * 2 = Z * 3 = E * 4 = h * 5 = S * 6 and 9 = g * 7 = L * 8 = B That gives the letters O,D,I,Z,E,H,S,G,L,B Changing the regex in my code as follows ```java if (word.matches("^[ODIZEHSGLB]*quot;)) System.out.println(word); ``` Allows me to find all the words. # Countdown In the game countdown you have to make the longest word given a set of nine letters.  What's the longest word I can get using the letters "AABBCCDDE"? I tried putting ```java if (word.matches("^[AABCDEFGH]*quot;)) System.out.println(word); ``` into my program. One of the words that came up is HEADACHE. Unfortunately in Countdown you can use each letter only once, and HEADACHE has two Hs and two Es.  It's probably easier to solve the rest of this problem programmatically, rather than using regexes. # Questions 1. How many words contain only the letters ABC? 2. What is the longest word you can make using only the letters ABCD? 3. Use the program to help solve the following Countdown conundrums 1. CDTNOUSIS 2. EIASENXTI 3. FODATRRVE 4. AECLESCPT 5. MYRSDADAE