How to extract a substring using Regex

From: "Postgres User" <postgres(dot)developer(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How to extract a substring using Regex
Date: 2007-08-24 00:33:17
Message-ID: b88c3460708231733u4e57f4cr36d1bc9ee80908b1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I'm new to Regex in Postgres. Can someone give me a quick pointer on
how I'd SELECT the substring between '<name>' and '</name>' in
a field?

Sample field data:
address city here <name>Rogers, Jim</name> zip code place

and I'd like the SELECT to return only:
Rogers, Jim

Thanks!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2007-08-24 00:43:51 Re: How to extract a substring using Regex
Previous Message Michael Glaesemann 2007-08-24 00:20:34 Re: %TYPE