From: Dan Date: 2009-06-21T17:41:21+09:00 Subject: Re: regular expression gurus--help! --0-618269181-1245573278=:61631 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable I think the code below could be improved, but try using StringScanner. require "strscan" s=3D"abcdefgh" ss =3D StringScanner.new(s) until ss.eos? =A0 a=3Dss.scan(/[a-z]{3}/) =A0 puts a =A0 ss.pos=3Dss.pos()-2 unless ss.eos? end output: abc bcd cde def efg fgh --0-618269181-1245573278=:61631--