From: Hassan Schroeder Date: 2011-11-24T03:14:22+09:00 Subject: Re: need help with gsub a string On Wed, Nov 23, 2011 at 9:28 AM, Ian M. Asaff wrote: > this is simpler... > > ruby-1.9.2-p290 :023 > s = "(linux) alpha / beta" >  => "(linux) alpha / beta" > ruby-1.9.2-p290 :024 > s.split("/")[1].strip >  => "beta" Or on the off chance there might be additional slashes in there -- > s.split('/').last.strip Alternately: > s.scan(/(\w+)\Z/).first.first TMTOWTDI! -- Hassan Schroeder ------------------------ hassan.schroeder@gmail.com http://about.me/hassanschroeder twitter: @hassan