From: Steven Ketcham Date: 2006-09-30T06:10:33+09:00 Subject: Re: string indexing/setting Sorry! Wrong order in the copy-and-paste. s = "000011481^3" pos = s.index("11") s[2..pos] = "BigString" puts s Thanks! Steve -----Original Message----- From: Simon Kr�ger [mailto:SimonKroeger@gmx.de] Sent: Friday, September 29, 2006 5:06 PM To: ruby-talk ML Subject: Re: string indexing/setting Steven Ketcham wrote: > I think I found a version difference between 1.82 and 1.84-20 Stable and I > wanted to know what correct code was and what was not. > > pos = s.index("11") what is 's' here? > s = "000011481^3" > > s[2..pos] = "BigString" > > puts s cheers Simon