From: Chris Hulan Date: 2011-05-11T23:55:31+09:00 Subject: Re: Generate random string matching specific pattern and length On May 10, 4:56 pm, Kevin wrote: ... > I'm trying to generate a random set of strings to fill a database with that > match the following pattern:  /^([A-Z]|[a-z]|-)+$/ ... This gem might fit your need: https://github.com/benburkert/randexp cheers