Re: patch adding new regexp functions - Mailing list pgsql-patches

From David Fetter
Subject Re: patch adding new regexp functions
Date
Msg-id 20070216182839.GG21379@fetter.org
Whole thread Raw
In response to Re: patch adding new regexp functions  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-patches
On Fri, Feb 16, 2007 at 01:03:32PM -0500, Andrew Dunstan wrote:
> 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.

This is why they only appear when called for :)

Cheers,
D
--
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666
                              Skype: davidfetter

Remember to vote!

pgsql-patches by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: patch adding new regexp functions
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Another aspect of set_ps_display ()