Re: regular expression - Mailing list pgsql-sql

From Gnanavel S
Subject Re: regular expression
Date
Msg-id eec3b03c0510042156u3c45b280h9fcb01617ca693d6@mail.gmail.com
Whole thread Raw
In response to regular expression  (gurkan@resolution.com)
List pgsql-sql
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

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster



--
with regards,
S.Gnanavel

pgsql-sql by date:

Previous
From: brett
Date:
Subject: BirthDay SQL Issue
Next
From: Michael Fuhr
Date:
Subject: Re: regular expression