From: William Crawford Date: 2006-08-25T10:07:01+09:00 Subject: Re: Determinig if 3 characters in a row are the same? Joel VanderWerf wrote: > ara.t.howard@noaa.gov wrote: >> >> re = %r/(...*?)\1/ > > irb(main):005:0> re = %r/(...*?)\1/ > => /(...*?)\1/ > irb(main):006:0> re =~ "abab" > => 0 > > Should that match? I think he interpreted it as '3 characters in a row, twice in the string' ... So 'abc1234abc678' would match the 'abc' but 'abab' only has 2 characters repeated, so doesn't match. -- Posted via http://www.ruby-forum.com/.