X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 11FF1D1B568 for ; Thu, 23 Oct 2003 18:12:46 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 02701-06 for ; Thu, 23 Oct 2003 15:12:16 -0300 (ADT) Received: from linux1.netlp.com.ar (linux1.netlp.com.ar [200.69.195.9]) by svr1.postgresql.org (Postfix) with ESMTP id AE455D1B55D for ; Thu, 23 Oct 2003 15:12:14 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=interlap.com.ar) by linux1.netlp.com.ar with esmtp (Exim 3.35 #1 (Linux)) id 1ACk6u-0000rG-00 for ; Thu, 23 Oct 2003 15:23:00 -0300 Message-ID: <3F981A06.5070009@interlap.com.ar> Date: Thu, 23 Oct 2003 15:12:22 -0300 From: Matias Surdi User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4.1) Gecko/20031008 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Regular expression problem Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/309 X-Sequence-Number: 15709 Hi... I'm dealing with a regular expression in a check constraint for many days.... i'm stuck with this... what I'm doing is adding a check to an existing table on a field called codigoex1 (varchar(9) ) check (codigoex1 ~* '[a-z]{2,2}') and I can't get it to work! I want to validate only input data such as "ar" "Us" "bR" and NOT something like "rum" "a" the previous reg. expr. only works like it were ~* '[a-z]{2}' , so, it ignores the maximum length. Tanks a lot!