From: skolo pen Date: 2011-10-11T03:14:19+09:00 Subject: Re: regex an array? Josh Cheek wrote in post #1025685: > On Fri, Oct 7, 2011 at 1:59 PM, skolo pen wrote: > >> > This could change depending on what constitutes valid data, but it > solves > the example you've given. > > array = ["user created TI: TI-0001"] > array.map { |line| line[/\S+$/] } # => ["TI-0001"] Fascinating, this gives me the appropriate output, thanks for the assistance all. -- Posted via http://www.ruby-forum.com/.