From: Paul Lutus Date: 2006-12-01T06:05:05+09:00 Subject: Re: Need a range, but not getting it. . . . Peter Bailey wrote: / ... > That did it! Here's what I did. I need to not just turn the hyphen into > range dots, but, I also need to get rid of any commas and stuff between > input entries. > ARGV.each do |f| > f = f.gsub(/-/, "..") > f = f.gsub(/,/, "") > puts f > end > > So, here's my input: > test1.rb im145000-145004, im145006, im145009 Are you putting those commas in there? This is not a good idea. It's not a good idea because someone will get the notion that they can use the commas and not put in the spaces, and that changes everything. For command-line arguments, this: xxxxx yyyyy zzzzz is not at all equal to this: xxxxx,yyyyy,zzzzz I think you need to decide what input format you want to allow. If you don't, your program won't be able to separate the arguments in a way that you expect. -- Paul Lutus http://www.arachnoid.com