From: Josselin Date: 2007-04-27T22:20:04+09:00 Subject: Re: string replacement... On 2007-04-27 09:39:04 +0200, Dan Zwell said: > Josselin wrote: >> I have a string : str = "/proposal/list/31551" >> >> I would like to change the 31551 by another value "9999", but I don't >> see whicj method I should use ? >> >> str.each and block ? or str.rindex('/') and concatenating the new value ? >> >> tfyh >> >> joss >> >> > > str.gsub!(/31551/, "9999") > > good luck, > dan thanks Dan, but I looked for more generic replacement.. as Stefano mentionned joss