From: Matthew Harris Date: 2006-07-26T21:26:44+09:00 Subject: Re: gsub Alternatively you can reverse, sub, reverse, but I like Vince's way. On 7/26/06, Vincent Fourmond wrote: > > Hello ! > > > s.gsub(/XX\z/,'') solves the problem in a static way. > > s.gsub(r,'') solves it too, but who can I specify, that only the last > > occurence should be replaced. > > Would > s.gsub(/#{r}$/,'') > do what you want ? > > Vince > > > -- Matt