You might want to look into this for dealing multiple spaces in your 
input:

http://www.ruby-doc.org/core-2.0/String.html#method-i-squeeze

-- 
Posted via http://www.ruby-forum.com/.