From: Jon Lim Date: 2005-11-22T02:08:20+09:00 Subject: Re: Regular Expressions and Ruby By default, matchines are greedy. Greedy matching means that it will try to match the maximum number of characters possible. Perhaps you want non-greedy matching? /(...)+?/i On 21/11/05, George Lunsford wrote: > Right, but technically, say for "prese" that string is periodic, and should > be matched as [p][re][se] but it's not getting that last e. > > On 11/21/05, Jon Lim wrote: > > > > It is matching [pr] and [es] -- http://www.snowblink.co.uk/