From: Josh Berkus <josh@agliodbs.com>
To: olly@lfix.co.uk
Cc: Theo Galanakis <Theo.Galanakis@lonelyplanet.com.au>
Cc: pgsql-sql@postgresql.org
Subject: Re: Isnumeric function?
Date: Wed, 8 Sep 2004 10:48:01 -0700
Message-ID: <200409081048.01034.josh@agliodbs.com> (raw)
In-Reply-To: <1094664017.2014.80.camel@linda>
References: <82E30406384FFB44AFD1012BAB230B55037D056E@shiva.au.lpint.net>
<200409080947.17682.josh@agliodbs.com>
<1094664017.2014.80.camel@linda>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, olly@lfix.co.uk, Theo.Galanakis@lonelyplanet.com.au
Subject: Re: Isnumeric function?
In-Reply-To: <200409081048.01034.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox