SELECT substring with regex

From: T E Schmitz <mailreg(at)numerixtechnology(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: SELECT substring with regex
Date: 2006-07-07 13:51:28
Message-ID: 44AE66E0.1040606@numerixtechnology.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I would like to split the contents of a column using substring with a
regular expression:

SELECT
substring (NAME, '^\\d+mm') as BASE_NAME,
substring (NAME, ??? ) as SUFFIX
FROM MODEL

The column contains something like
"150mm LD AD Asp XR Macro"
I want to split this into
"150mm", "LD AD Asp XR Macro"

How can I extract the bit following the matching substring?

--

Regards,

Tarlika Elisabeth Schmitz

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message James Moliere 2006-07-07 13:53:45 create aggregate function 'count_bool( column_name, boolean )'
Previous Message Michael Glaesemann 2006-07-07 13:33:35 Re: How to get list of days between two dates?