From: John Gesimondo Date: 2010-02-12T04:01:26+09:00 Subject: Re: n00b: text processing from magnetic stip input Sorry about the confusion. Apparently I asked the question wrong. I was just looking for some help with the regular expression part. I didn't know how to extract variables from a long string. > regex = %r{\%B(.*)\^(.*)/ [...and so on...] } This was quite helpful. I was able to figure this out: %r{\%B(\d*)\^(\S*)\/(\S*)\s([a-zA-Z])} So I think the problem is solved! Because I *think* I know how to integrate this into my program. Thanks for the help, and I'll be sure to include my attempts next time. And please let me know if you noticed anything wrong with that regex. John -- Posted via http://www.ruby-forum.com/.