From: Tobias Reif Date: 2002-02-07T19:50:07+09:00 Subject: Re: shuffle (all possible sequences) ts wrote: >>>>>>"T" == Tobias Reif 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" Yep; already (hopefully) fixed that bug: class String def consists_of word self =~ /\A[#{word}]{#{word.length}}\z/ end end Tobi -- * peace&love. * http://www.pinkjuice.com/