You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@gmail.com> on 2010/09/22 15:41:41 UTC
Re: svn commit: r999911 - /httpd/httpd/trunk/docs/manual/developer/new_api_2_4.xml
On Wed, Sep 22, 2010 at 8:38 AM, <ni...@apache.org> wrote:
> Author: niq
> Date: Wed Sep 22 12:38:42 2010
> New Revision: 999911
>
> URL: http://svn.apache.org/viewvc?rev=999911&view=rev
> Log:
> Add ap_rxplus to new_api docs
>
> Modified:
> httpd/httpd/trunk/docs/manual/developer/new_api_2_4.xml
>
> Modified: httpd/httpd/trunk/docs/manual/developer/new_api_2_4.xml
> URL:
> http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/developer/new_api_2_4.xml?rev=999911&r1=999910&r2=999911&view=diff
>
> ==============================================================================
> --- httpd/httpd/trunk/docs/manual/developer/new_api_2_4.xml (original)
> +++ httpd/httpd/trunk/docs/manual/developer/new_api_2_4.xml Wed Sep 22
> 12:38:42 2010
> @@ -63,6 +63,14 @@
> <code>ap_mpm_register_timed_callback</code> is new.</p>
> </section>
>
> + <section id="ap_regex">
> + <title>ap_regex (changed)</title>
> + <p>In addition to the existing regexp wrapper, a new higher-level API
> + <code>ap_rxplus</code> is now provided. This provides the capability to
> + compile Perl-style expressions like
> <code>s/regexp/replacement/flags</code>
> + and to execute them against arbitrary strings. Also regexp memory.</p>
> + </section>
>
Can you clarify "Also regexp memory." ?
Re: svn commit: r999911 - /httpd/httpd/trunk/docs/manual/developer/new_api_2_4.xml
Posted by Jeff Trawick <tr...@gmail.com>.
On Thu, Sep 23, 2010 at 4:54 AM, Arvind Srinivasan
<Ar...@sun.com>wrote:
> On 09/22/10 22:14, Jeff Trawick wrote:
>
> How about ", and access matches from regexp memory." or something like
>> that? (I think just a few extra words will clue in another 40% of the
>> audience to what you're referring to ;) )
>>
>>
> 'Support for regexp backreferences' is what I think niq means by 'regexp
> memory'.
>
agreed; "access matches from regexp memory" is too watered down, since you
either know what the concept is or you can't use it anyway; your phrase is
better
Re: svn commit: r999911 -
/httpd/httpd/trunk/docs/manual/developer/new_api_2_4.xml
Posted by Arvind Srinivasan <Ar...@Sun.COM>.
On 09/22/10 22:14, Jeff Trawick wrote:
> How about ", and access matches from regexp memory." or something like
> that? (I think just a few extra words will clue in another 40% of the
> audience to what you're referring to ;) )
>
'Support for regexp backreferences' is what I think niq means by 'regexp memory'.
--
Arvind
Re: svn commit: r999911 - /httpd/httpd/trunk/docs/manual/developer/new_api_2_4.xml
Posted by Jeff Trawick <tr...@gmail.com>.
On Wed, Sep 22, 2010 at 11:57 AM, Nick Kew <ni...@webthing.com> wrote:
> On Wed, 22 Sep 2010 09:41:41 -0400
> Jeff Trawick <tr...@gmail.com> wrote:
>
> > Can you clarify "Also regexp memory." ?
>
> This is supposed to be a very brief overview - detail is in the
> apidoc (including an important caveat).
>
sure, but I don't think the fragment "Also regexp memory." is going to mean
much to most readers (at least this one)
> But specifically you can retrieve the last match from the regexp
> memory. So in perl terms
>
> $foo =~ /reg(.*)exp/i;
> $bar = $1;
>
> becomes
> rx = ap_rxplus_compile(pool, "/reg(.*)exp/i");
> matched = ap_rxplus_exec(pool, rx, foo, NULL);
> then either
> ap_rxplus_match(rx, 1, &barlen, &bar); /* as pointer+length */
> or
> bar = ap_rxplus_pmatch(pool, rx, 1); /* as a string */
>
How about ", and access matches from regexp memory." or something like
that? (I think just a few extra words will clue in another 40% of the
audience to what you're referring to ;) )
Re: svn commit: r999911 -
/httpd/httpd/trunk/docs/manual/developer/new_api_2_4.xml
Posted by Nick Kew <ni...@webthing.com>.
On Wed, 22 Sep 2010 09:41:41 -0400
Jeff Trawick <tr...@gmail.com> wrote:
> Can you clarify "Also regexp memory." ?
This is supposed to be a very brief overview - detail is in the
apidoc (including an important caveat).
But specifically you can retrieve the last match from the regexp
memory. So in perl terms
$foo =~ /reg(.*)exp/i;
$bar = $1;
becomes
rx = ap_rxplus_compile(pool, "/reg(.*)exp/i");
matched = ap_rxplus_exec(pool, rx, foo, NULL);
then either
ap_rxplus_match(rx, 1, &barlen, &bar); /* as pointer+length */
or
bar = ap_rxplus_pmatch(pool, rx, 1); /* as a string */
--
Nick Kew