Re: patch adding new regexp functions

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: David Fetter <david(at)fetter(dot)org>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Jeremy Drake <pgsql(at)jdrake(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>, Neil Conway <neilc(at)samurai(dot)com>
Subject: Re: patch adding new regexp functions
Date: 2007-02-16 18:03:32
Message-ID: 45D5F1F4.7090502@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

David Fetter wrote:
>>
>> The question is, what is the use case? If there is one in Perl, can
>> this proposed function API support it?
>>
>
> Perl makes the following variables available in any regex match,
> although it optimizes some cases for when they're not there:
>
> $1, ... $n (captured matches in parentheses)
> $` (pre-match)
> $' (post-match)
> $& (whole match)
>
>

Use of any of these is notoriously costly, BTW, especially pre-match and
post-match. See perlre man page.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2007-02-16 18:19:54 Re: patch adding new regexp functions
Previous Message Pavan Deolasee 2007-02-16 17:49:54 Re: HOT for PostgreSQL 8.3

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2007-02-16 18:19:54 Re: patch adding new regexp functions
Previous Message David Fetter 2007-02-16 17:49:36 Re: patch adding new regexp functions