Re: perlsub - Mailing list pgsql-novice

From Nabil Sayegh
Subject Re: perlsub
Date
Msg-id 3F81803B.1020808@e-trolley.de
Whole thread Raw
In response to Re: perlsub  (Jeff Eckermann <jeff_eckermann@yahoo.com>)
Responses Re: perlsub  (Jeff Eckermann <jeff_eckermann@yahoo.com>)
List 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


pgsql-novice by date:

Previous
From: Jeff Eckermann
Date:
Subject: Re: perlsub
Next
From: papapep
Date:
Subject: Filtering duplicated row with a trigger