pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: TJ O'Donnell <tjo@acm.org>
To: anoopmadavoor@gmail.com, PostgreSQL - SQL <pgsql-sql@postgresql.org>
Subject: Re: How I can check a substring is a valid number in postgresql ?
Date: Thu, 24 Apr 2008 08:43:17 -0700
Message-ID: <4810AA95.3080609@acm.org> (raw)

This regular expression works for numeric/float values as
well as integers.  It allows for exponents.

tvalue ~ E'^[+-]?[0-9]+(\\\\.[0-9]*)?([Ee][+-]?[0-9]+)?\$'

TJ O'Donnell
http://www.gnova.com/



view thread (3+ messages)

Message-ID: <4810AA95.3080609@acm.org>
Permalink:  ../4810AA95.3080609@acm.org/
Also on:    postgresql.org/message-id/4810AA95.3080609@acm.org

 · 

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: tjo@acm.org
  Subject: Re: How I can check a substring is a valid number in postgresql ?
  In-Reply-To: <4810AA95.3080609@acm.org>

* 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