in reply to regex for word puzzle
This narrows (with the dictionary i have) the list for "RTESAMCNA" down to just 35 words. From there, you can use the lc/split/sort/join & hash method to get the final list (for example, it finds 'treatment', but clearly that should be excluded). Obvisouly the longer the jumble, the better off this initial pass is.. (And depends on the letter combinations, too)my $jumble = 'RTESAMCNA'; open FILE, "/usr/share/dict/words"; my $n = length $jumble; my @possible_words = grep /^[$jumble]{$n}$/i, map {chomp; $_} <FILE> +; close FILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: regex for word puzzle
by inman (Curate) on Jun 13, 2005 at 12:14 UTC |