httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject Re: svn commit: r999911 - /httpd/httpd/trunk/docs/manual/developer/new_api_2_4.xml
Date Wed, 22 Sep 2010 15:57:54 GMT
On Wed, 22 Sep 2010 09:41:41 -0400
Jeff Trawick <trawick@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

Mime
View raw message