正则表达式代理服务器

I control access via a proxy server and run some regex on every request. For prototype I have used curl, regex and php. Obviously this will not put up with any serious load. Can anyone suggest and proxy servers that would be suitable?

Why do need to 'run' some regexp? For rewriting the request url? In that case, Apache can do it, it has a proxy module and a (regexp based) rewriting engine. I used it, once, so i'm sure those functions can be combined.

http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

But Squid is designed to be a proxy server (not a web server) and wil most probably be able to do some URL rewriting as well.