From: brabuhr@... Date: 2009-10-21T06:28:15+09:00 Subject: Re: Randomly generated words from a set of letters On Tue, Oct 20, 2009 at 10:50 AM, wrote: > Hi, > > I have an interesting problem to solve and thought I'd ask for some input here.  We're developing an application and one part of it is building a random combination for this lock... > > http://wordlock.com/_pdf/Wordlock-Bikelock-Instructions.pdf > > So there are four columns, each contains a specific set of letters. I won't speak to what might make a good design for you :), but: irb(main):001:0> File.open('/usr/share/dict/words').read.scan(/^[bdfhlmprst][aeiloruy][iklnrsaenrot][ledkstpdny]$/i) => ["Baal", "Ball", "Bart", "Bass", "Bean", "Bell", "Bern", "Bert", "Bess", "Best", "Bill", "Bird", "Boas", "Bond", "Bonn", "Bork", "Born", "Bose", "Brad", "Bran", "Bray", "Bret", "Brie", "Brit", "Burl", "Burt", "Byrd", "Dale", "Dane", "Dare", "Dean", "Deon", "Dial", "Dion", "Dirk", "Dole", "Donn", "Duke", "Dunn", "Duse", "Fern", "Fiat", "Finn", "Fisk", "Ford", "Fran", "Fred", "Frey", "Haas", "Hale", "Hall", "Hals", "Hank", "Hans", "Hart", "Head", "Heep", "Hell", "Hess", "Hill", "Hiss", "Holt", "Hood", "Horn", "Huey", "Hull", "Huns", "Hunt", "Land", "Lane", "Laos", "Lars", "Lean", "Lent", "Leon", "Leos", "Lily", "Lind", "Lois", "Lord", "Lott", "Luis", "Luke", "Lyle", "Lyly", "Lynn", "Lyon", "Male", "Mann", "Mark", "Mars", "Mary", "Mass", "Matt", "Mead", "Mike", "Mill", "Minn", "Miss", "Moll", "Monk", "Mons", "Mont", "Moon", "More", "Mort", "Moss", "Mott", "Muse", "Myst", "Park", "Pate", "Peel", "Pele", "Penn", "Perl", "Pete", "Pike", "Pitt", "Pole", "Polk", "Post", "Pres", "Pyle", "Rand", "Reed", "Reid", "Rene", "Riel", "Rios", "Root", "Rory", "Rose", "Ross", "Russ", "Ryan", "Saks", "Salk", "Sand", "Sean", "Sian", "Sony", "Tass", "Tate", "Tell", "Tess", "Tony", "Tory", "Tran", "Trey", "Troy", "Tues", "Tull", "Turk", "Tyre", "baas", "bail", "bait", "bake", "bald", "bale", "balk", "ball", "band", "bane", "bank", "bans", "bard", "bare", . . .