Re: perlsub

From: Nabil Sayegh <postgresql(at)e-trolley(dot)de>
To: Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com>
Cc: Nabil Sayegh <postgresql(at)e-trolley(dot)de>, pgsql-novice(at)postgresql(dot)org
Subject: Re: perlsub
Date: 2003-10-06 14:46:19
Message-ID: 3F81803B.1020808@e-trolley.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Jeff Eckermann wrote:
> Perhaps if you could post a "real" example, you might
> get more useful help.

Here we go:

SELECT s('abc 123','([^ ]*) (.*)','$2 $1');

This regex should swaps 2 columns seperated by 1 space.

For the moment I harcoded my regex in a special function, but I would be
delighted if it would be possible (without the use of eval) to have
arbitrary regular expression search-replace.

I don't think we're getting off-topic as too many ppl have asked this
question already and always the answer has been: Use PL/Perl

cu
--
e-Trolley Sayegh & John, Nabil Sayegh
Tel.: 0700 etrolley /// 0700 38765539
Fax.: +49 69 8299381-8
PGP : http://www.e-trolley.de

In response to

  • Re: perlsub at 2003-10-06 14:17:01 from Jeff Eckermann

Responses

  • Re: perlsub at 2003-10-07 19:46:59 from Jeff Eckermann

Browse pgsql-novice by date

  From Date Subject
Next Message Menke, Kurt 2003-10-06 14:49:26 Re: importing data automatically
Previous Message Jeff Eckermann 2003-10-06 14:17:01 Re: perlsub