Re: Isnumeric function? - Mailing list pgsql-sql

From Oliver Elphick
Subject Re: Isnumeric function?
Date
Msg-id 1094664017.2014.80.camel@linda
Whole thread Raw
In response to Re: Isnumeric function?  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Isnumeric function?
List pgsql-sql
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
thewiles of the devil."                                               Ephesians 6:11 
 



pgsql-sql by date:

Previous
From: Josh Berkus
Date:
Subject: Re: How to rename a constraint/trigger??
Next
From: Josh Berkus
Date:
Subject: Re: Isnumeric function?