From: Mathijs Date: 2008-03-14T20:29:56+09:00 Subject: Re: use reqex to get the middle character and repeat it Dan Diebolt schreef: > [Note: parts of this message were removed to make it a legal post.] > >> string will always be 3 chars long > > If the string is always 3 chars long you could simply do this > > str[0..0] + str[1..1] *4 + str[2..2] > > or this > > str[0].chr + str[1].chr * 4 + str[2].chr > > or this... str[1,1]=str[1,1]*4