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 95D67329D8A for ; Wed, 8 Sep 2004 18:20:27 +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 62400-03 for ; Wed, 8 Sep 2004 17:20:25 +0000 (GMT) Received: from anchor-post-33.mail.demon.net (anchor-post-33.mail.demon.net [194.217.242.91]) by svr1.postgresql.org (Postfix) with ESMTP id E3E23329D89 for ; Wed, 8 Sep 2004 18:20:24 +0100 (BST) Received: from lfix.demon.co.uk ([80.177.205.209] helo=cerberus.lfix.co.uk) by anchor-post-33.mail.demon.net with esmtp (Exim 3.35 #1) id 1C567J-000Jbs-0X; Wed, 08 Sep 2004 17:20:22 +0000 Received: from linda.lfix.co.uk ([192.168.1.1]) by cerberus.lfix.co.uk with esmtp (Exim 4.34) id 1C567F-0002Rd-A8; Wed, 08 Sep 2004 18:20:17 +0100 Subject: Re: Isnumeric function? From: Oliver Elphick Reply-To: olly@lfix.co.uk To: Josh Berkus Cc: Theo Galanakis , pgsql-sql@postgresql.org In-Reply-To: <200409080947.17682.josh@agliodbs.com> References: <82E30406384FFB44AFD1012BAB230B55037D056E@shiva.au.lpint.net> <1094537126.6360.279.camel@linda> <200409080947.17682.josh@agliodbs.com> Content-Type: text/plain Organization: LFIX Limited Message-Id: <1094664017.2014.80.camel@linda> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 08 Sep 2004 18:20:17 +0100 Content-Transfer-Encoding: 7bit X-LFIX-MailScanner: Found to be clean X-MailScanner-From: olly@lfix.co.uk 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/48 X-Sequence-Number: 18894 On Wed, 2004-09-08 at 17:47, Josh Berkus wrote: > Oliver, Theo: > > > ~ '^[0-9]+$' > > Actually, I usually do: > > ~ '^[0-9]+\.?[0-9]*$' > > ... to include decimals. However, the above assumes that there is at least a > "0" before the decimal; it would be nice to adapt it to matching a leading > decimal (i.e. .057 ) as well. Can't see any easy way, though ... ~ '^([0-9]+|[0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)$' -- Oliver Elphick olly@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA ======================================== "Put on the whole armor of God, that ye may be able to stand against the wiles of the devil." Ephesians 6:11