Re: perlsub
| От | Nabil Sayegh |
|---|---|
| Тема | Re: perlsub |
| Дата | |
| Msg-id | 3F81803B.1020808@e-trolley.de обсуждение исходный текст |
| Ответ на | Re: perlsub (Jeff Eckermann <jeff_eckermann@yahoo.com>) |
| Ответы |
Re: perlsub
|
| Список | 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 по дате отправления: