If noone objects, I propose to expand ap_regex/util_pcre a little to support a higher level of regexp processing.
The basic motivations are: 1. A regexp object that includes memory (nmatch/pmatch), flags, and a substitution pattern, alongside the existing ap_regex. 2. One-stop compilation of Perl-style regexps such as s/foo/bar/i. 3. One-stop execution of a regexp on a string, including applying a replacement string where applicable. Examples of where this would apply in existing code include things like mod_substitute, mod_headers, and mod_rewrite. What I've written so far is small and simple: a new type and two functions (compile/exec). That's all it takes! Any objections? -- Nick Kew
