From: "Ian M. Asaff" Date: 2011-11-24T02:23:08+09:00 Subject: Re: need help with gsub a string --0016e64c1d5c4d59c904b26a2c59 Content-Type: text/plain; charset=ISO-8859-1 something like this? ruby-1.9.2-p290 :016 > s = "(linux) alpha / beta" => "(linux) alpha / beta" ruby-1.9.2-p290 :017 > s.slice(s.index("/")+1,s.length).strip => "beta" On Wed, Nov 23, 2011 at 12:13 PM, skolo pen wrote: > Lacking in regular expressions knowledge, I am having difficulty > replacing the string as shown: > > "(linux) alpha/beta" > > Essentially, there may be spaces such as: > > " ( linux)alpha / beta" or maybe "(linux) alpha / beta" > > What I am trying to replace that whole string with is just the last word > after the / so my string will just be "beta". > > -- > Posted via http://www.ruby-forum.com/. > > --0016e64c1d5c4d59c904b26a2c59--