X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 96ABE329EBB for ; Wed, 8 Sep 2004 18:51:45 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 72664-05 for ; Wed, 8 Sep 2004 17:51:23 +0000 (GMT) Received: from davinci.ethosmedia.com (server226.ethosmedia.com [209.128.84.226]) by svr1.postgresql.org (Postfix) with ESMTP id ED516329D4D for ; Wed, 8 Sep 2004 18:51:23 +0100 (BST) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 6302982; Wed, 08 Sep 2004 10:52:41 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Organization: Aglio Database Solutions To: olly@lfix.co.uk Subject: Re: Isnumeric function? Date: Wed, 8 Sep 2004 10:48:01 -0700 User-Agent: KMail/1.4.3 Cc: Theo Galanakis , pgsql-sql@postgresql.org References: <82E30406384FFB44AFD1012BAB230B55037D056E@shiva.au.lpint.net> <200409080947.17682.josh@agliodbs.com> <1094664017.2014.80.camel@linda> In-Reply-To: <1094664017.2014.80.camel@linda> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200409081048.01034.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/49 X-Sequence-Number: 18895 Theo, Oliver, > Any reason why you don't like ~ '^([0-9]?)+\.?[0-9]*$' ? Yes, because it also matches "." , which is not a valid numeric value. > ~ '^([0-9]+|[0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)$' Ah, the brute force approach ;-) Actually, the above could be written: ~ '^([0-9]+)|([0-9]*\\.[0-9]+)$' ... though that still seems inelegant to me. Is there a regex expert in the house? -- Josh Berkus Aglio Database Solutions San Francisco