>>>>> "T" == Tobias Reif <tobiasreif / pinkjuice.com> writes:

T> class String
T>    def consists_of word
T>      self =~ /[#{word}]{#{word.length}}/
T>    end
T> end

 Well, it depend what you want to do but try it with

   "aaa".consists_of "abc"
   "xxxxxxabcxxxxx".consists_of "abc"



Guy Decoux