On 06 Oct 2015, at 12:17 AM, Stefan Fritsch <[email protected]> wrote:

>> How about a regex function?
>> 
>> The single argument could be “s/PATTERN/REPLACEMENT/FLAGS”.
> 
> I think this would be easy to implement. It would require the regex to 
> be parsed on every execution, though, which has the disadvantages that 
> it is slower and that one would get error messages only during first 
> execution and not during server startup. Also, it would possibly allow 
> the admin to configure expressions where the regex pattern can contain 
> untrusted data, which would turn a lot of libpcre problems from local 
> into remote vulnerabilities.

What I had in mind was for the regex to be precompiled at startup along with 
everything else, but I see now that it would need a special syntax anyway to 
distinguish it from arbitrary string data.

Regards,
Graham
—

Reply via email to