ara.t.howard / noaa.gov wrote: > On Fri, 25 Aug 2006, Ben Johnson wrote: > >> Sorry for the noob question, but is there a fast and efficient way to >> determine if there are 3 of the same charater in a row in a string? I'm >> sure this could be done in regex but I am not a black belt in regex. >> >> thanks for your help. > > harp:~ > cat a.rb > require 'yaml' > > re = %r/(...*?)\1/ irb(main):005:0> re = %r/(...*?)\1/ => /(...*?)\1/ irb(main):006:0> re =~ "abab" => 0 Should that match? -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407