Help: Using a regular expression match as a value

From: "Richard DeVenezia" <radevenz(at)ix(dot)netcom(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Help: Using a regular expression match as a value
Date: 2000-10-21 14:18:07
Message-ID: 023401c03b69$bcc55df0$0101a8c0@supermicro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I am just getting started with pgsql and have read available docs I can
find.

I know I can match a row in a where clause using a regular expression.

How can I use what was regexp matched (e.g. perl $1,$2, etc...) as a column
assignment ?

I'm looking for something like this?
select ...
...
$1 of firstname, /^R.*d/ as name_starts_with_r_and_ends_with_d
...

TIA

Richard DeVenezia

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jan Wieck 2000-10-22 12:26:12 Re: foreign key introduces unnecessary locking ?
Previous Message Keith Kratochvil 2000-10-20 13:52:35 Re: what is the best way to set-up keywords in tables and Queries ?