From: Dan Diebolt Date: 2008-03-14T09:55:46+09:00 Subject: Re: use reqex to get the middle character and repeat it --0-628893670-1205456142=:94959 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit >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 --0-628893670-1205456142=:94959--