pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Elphick <olly@lfix.co.uk>
To: Josh Berkus <josh@agliodbs.com>
Cc: Theo Galanakis <Theo.Galanakis@lonelyplanet.com.au>
Cc: pgsql-sql@postgresql.org
Subject: Re: Isnumeric function?
Date: Wed, 08 Sep 2004 18:20:17 +0100
Message-ID: <1094664017.2014.80.camel@linda> (raw)
In-Reply-To: <200409080947.17682.josh@agliodbs.com>
References: <82E30406384FFB44AFD1012BAB230B55037D056E@shiva.au.lpint.net>
	<1094537126.6360.279.camel@linda>
	<200409080947.17682.josh@agliodbs.com>

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 




view thread (29+ messages)  latest in thread

Message-ID: <1094664017.2014.80.camel@linda>
Permalink:  ../1094664017.2014.80.camel@linda/
Also on:    postgresql.org/message-id/1094664017.2014.80.camel@linda

 · 

reply

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: olly@lfix.co.uk, josh@agliodbs.com, Theo.Galanakis@lonelyplanet.com.au
  Subject: Re: Isnumeric function?
  In-Reply-To: <1094664017.2014.80.camel@linda>

* 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