From: Jonathan Rochkind Date: 2009-06-17T06:37:19+09:00 Subject: Re: separate a string of values into an array - noob Mmcolli00 Mom wrote: > What if it weren't coming from a directory could you still you .map? > -Misty The way to do this depends on what the input is, if not a directory? I don't know how you'd get this input, but let's say you have a string: input = "234234.EXE 234234.EXE 234545.EXE 34543435.EXE 234563.EXE 24324345.EXE" tokens = input.split(' ') first_token = tokens.first remove_suffix = first_token.split('.').first # Or all in one line if you like: input.split(' ').first.split('.').first There are a variety of other ways to do 'this', but what 'this' is depends on, well, what you're doing. -- Posted via http://www.ruby-forum.com/.