From: "Jesús Gabriel y Galán" Date: 2009-11-27T05:12:16+09:00 Subject: Re: Pattern match to fail if two periods in a row On Thu, Nov 26, 2009 at 8:51 PM, Ralph Shnelvar wrote: > Ok ... I really tried.  And I used http://rubular.com/  (really nice) > > And I read and reread the pickaxe book section on regular > expressions. > > In other words ... I tried. > > So .. > > How does one create an expression that fails if there are two or more periods > (e.g. "..") in a row? >> "abc..def" !~ /\.\./ => false One easy way is to use the negated match operator (!~). Then the regexp is trivial. Jesus.