hey there,

  looks like you're on the right track...  check out regexps - they're 
easy to get started with, and i think they'll help you a bunch...

http://www.ruby-doc.org/core-1.9.3/Regexp.html
http://www.tutorialspoint.com/ruby/ruby_regular_expressions.htm
http://rubular.com/

  hth-

  - j

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