From: Louis-Philippe Date: 2009-11-27T06:49:22+09:00 Subject: Re: Pattern match to fail if two periods in a row --001636c5c03fd1895b04794d2575 Content-Type: text/plain; charset=ISO-8859-1 so then only trying to match: /\w+\.?\w*/ should do 2009/11/26 Ralph Shnelvar > > >>> "abc..def" !~ /\.\./ > =>> false > > I don't think that > "abc..def" !~ /\.\./ > is a regular expression. > > /\.\./ > is a regular expression. > > > Basically ... I need something that will work in a Rails > validates_format_of > > # Reject if the email address has two periods in a row > validates_format_of :email, > # See http://en.wikipedia.org/wiki/E-mail_address > :with => ????, > :message => 'invalid email format' > > > > > > --001636c5c03fd1895b04794d2575--