pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gnanavel S <s.gnanavel@gmail.com>
To: gurkan@resolution.com <gurkan@resolution.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: regular expression
Date: Wed, 5 Oct 2005 10:26:58 +0530
Message-ID: <eec3b03c0510042156u3c45b280h9fcb01617ca693d6@mail.gmail.com> (raw)
In-Reply-To: <1128377310.4341abde55776@www.resolution.com>
References: <1128377310.4341abde55776@www.resolution.com>

Try this,
select substring('6768 - THY','[0-9]*');
substring
-----------
6768
(1 row)

On 10/4/05, gurkan@resolution.com <gurkan@resolution.com> wrote:
>
> How do I do regular expression for the problem that I am having
> I have a string called desc, and say that this string in
>
> "TSWUU" ------ ""
> "4 - DSC" ------ "4"
> "6768 - THY" ------ "6768"
>
> basically string may or may not start with number,
> I need substring of digits parts
> ""
> "4"
> "6768"
>
> -------------------------------------------------
> This mail sent through IMP: www.resolution.com <http://www.resolution.com;
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>



--
with regards,
S.Gnanavel

view thread (5+ messages)  latest in thread

Message-ID: <eec3b03c0510042156u3c45b280h9fcb01617ca693d6@mail.gmail.com>
Permalink:  ../eec3b03c0510042156u3c45b280h9fcb01617ca693d6@mail.gmail.com/
Also on:    postgresql.org/message-id/eec3b03c0510042156u3c45b280h9fcb01617ca693d6@mail.gmail.com

 · 

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: s.gnanavel@gmail.com, gurkan@resolution.com
  Subject: Re: regular expression
  In-Reply-To: <eec3b03c0510042156u3c45b280h9fcb01617ca693d6@mail.gmail.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