From: Adam Prescott Date: 2011-11-24T02:55:47+09:00 Subject: Re: need help with gsub a string --f46d044789130d7c2204b26aa195 Content-Type: text/plain; charset=UTF-8 If you are regexically-inclined: "(linux) alpha / beta"[/(?<=\/).+$/] #=> " beta" If only there were variable-length look-aheads, then it could be (?<=\/ ?), for what I assume is a possible case of "alpha/beta". (I don't recommend doing it this way, necessarily, just throwing it out there.) --f46d044789130d7c2204b26aa195--