Generate a suitable random (or otherwise) integer and express in base 36: puts rand(36**6).to_s(36) Dave -- Posted via http://www.ruby-forum.com/.