Hi Nick As I mentioned in my original mail, PCRE DO support getting the length as argument!
Please take a short look at ap_regexec implementation (util_pcre.c file) and you will see that current code pass PCRE the length (which is obtained with strlen). So it is just change in HTTPD wrapping API! Best regards, Yehezkel -----Original Message----- From: Nick Kew [mailto:[email protected]] Sent: Thursday, May 19, 2011 5:27 PM To: [email protected] Subject: Re: ap_regexec API for buffers (not NULL terminated strings) On 19 May 2011, at 12:22, Graham Leggett wrote: > On 19 May 2011, at 1:06 PM, Yehezkel Horowitz wrote: > >> Can anyone explain why ap_regexec can take only NULL terminated string? Presumably because that's what PCRE supports! > Sounds like a sensible thing to have. Indeed, I could certainly use it. But surely this should be an enhancement request for PCRE. Once they have it, wrapping the API for HTTPD becomes trivial! Anyone sufficiently familiar with regexp internals to say what it would take? -- Nick Kew Available for work, contract or permanent http://www.webthing.com/~nick/cv.html Scanned by Check Point Total Security Gateway.
